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

Add multiple annotators to Omni-MATH and rename shared modules #3291

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

liamjxu
Copy link
Contributor

@liamjxu liamjxu commented Jan 23, 2025

No description provided.

@liamjxu liamjxu requested a review from yifanmai January 23, 2025 19:06
if len(all_judgements) == 0:
raise ValueError("Could not compute Omni-MATH accuracy because all annotators failed.")
judgement_bools = [judgement.strip().upper() == "TRUE" for judgement in all_judgements]
score = sum(judgement_bools) / len(judgement_bools)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not valid to sum an array of bools, right? You need to cast them to int first.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think bool is a subclass of int in Python, so it actually works fine..? If that introduces too much ambiguity I can go with explicit casting for sure.

>>> sum([True, False])
1
>>> issubclass(bool, int)
True

Comment on lines +86 to +87
if equivalence_judgement == "":
continue # skip this annotator if there is no equivalence judgement parsed
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't skip.

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