-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Db evidence selection #188
base: main
Are you sure you want to change the base?
Conversation
…and render functions.
… with the toggle to exclude db evidence
flag to the various functions that it calls.
… from stmts hashes
…rom curators to explorators
…plates accordingly
…Update blueprint name and URL prefix from curator to explorator. Rename web interface related functions from curate to explore
… instead of Neo4j property
src/indra_cogex/apps/utils.py
Outdated
if isinstance(stmt, list): | ||
stmt_hash, evidence = stmt[0], stmt[1] | ||
row = _stmt_to_row( | ||
stmt_hash, | ||
evidence=evidence, | ||
cur_dict=cur_dict, | ||
cur_counts=cur_counts, | ||
remove_medscan=remove_medscan, | ||
source_counts=source_counts_per_hash.get(stmt_hash) if source_counts_per_hash else None, | ||
) | ||
else: | ||
row = _stmt_to_row( | ||
stmt, | ||
cur_dict=cur_dict, | ||
cur_counts=cur_counts, | ||
remove_medscan=remove_medscan, | ||
source_counts=source_counts_per_hash.get(stmt.get_hash()) if source_counts_per_hash else None, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something is off here:
_stmt_to_row
takes an indraStatement
as its first argument, not a statement hash.- There is no kwarg for
evidence
, yet it is passed in the when theif
branch of the code is executed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in cbdb3c6
@@ -497,11 +503,21 @@ def indra_stmts_from_relations(rels: Iterable[Relation], | |||
""" | |||
stmts_json = [load_statement_json(rel.data["stmt_json"]) for rel in rels] | |||
stmts = stmts_from_json(stmts_json) | |||
# Beliefs are not set correctly in the JSON so we fix them here | |||
|
|||
# Beliefs are not set correctly in the JSON, so we fix them here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's actually fixed now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you want me to take it out or leave it as it is? Since it was already present earlier.
…ts and fix: pass Statement object and remove unused evidence parameter in _stmt_to_row
…t for correct query syntax and added evidence prioritization with limit and filtering options.
Pull request to merge the changes made for adding the statements with database evidences in the curation pages.