Skip to content
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

Open
wants to merge 77 commits into
base: main
Choose a base branch
from

Conversation

prasham21
Copy link

Pull request to merge the changes made for adding the statements with database evidences in the curation pages.

Prasham Marfatia and others added 30 commits October 3, 2024 11:33
 flag to the various  functions
that it calls.
Comment on lines 256 to 273
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,
)
Copy link
Collaborator

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 indra Statement as its first argument, not a statement hash.
  • There is no kwarg for evidence, yet it is passed in the when the if branch of the code is executed.

Copy link
Author

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
Copy link
Collaborator

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.

Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants