Repository navigation
Fix aimo_progress_prize_1 exact match on integer gold answers - #1452
Open
mottopanikeiku wants to merge 1 commit into
Open
mottopanikeiku wants to merge 1 commit into
mottopanikeiku wants to merge 1 commit into
Conversation
The AIMO gold is a plain integer, and math_normalizer returns an empty string for text without \boxed{}, so every gold became "" and any unboxed answer matched it while a correct boxed answer scored 0. I now normalize only the prediction and added a test built from problem 229ee8.
Assisted-by: Claude
Assisted-by: GPT-6 Astra
Signed-off-by: mottopanikeiku <176798723+mottopanikeiku@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
aimo_progress_prize_1task passesmath_normalizeras bothnormalize_goldandnormalize_pred. The gold is the plain integer answer (str(line["answer"])), andmath_normalizeronly keeps the content of the last\boxed{}. When there is no box it returns"", so every gold becomes"". A non-empty answer without a box then matches the gold and scores 1, and a boxed answer scores 0 even when it is correct.This PR keeps
math_normalizeron the prediction only, so the boxed answer is compared with the integer gold. The Inspect path (lighteval eval) usesmath_scorerand is not affected.Reproducer:
So the answer is $\boxed{52}$.So the answer is $\boxed{40}$.So the answer is 40.I also ran
lighteval accelerate "model_name=<model>,device=cpu" "aimo_progress_prize_1|0" --save-detailson all 10 problems and re-scored the saved answers with this branch:Writing each reference answer as
The answer is $\boxed{<answer>}$.scores 0/10 on main and 10/10 with this change.The metric key becomes
em:normalize_pred=<function math_normalizer ...>.I added
tests/unit/tasks/test_aimo.py. Two of its three cases fail on main, and all three pass with this change.I found this by reading and testing the code.
I made this PR and directed its development, with AI assistance from Claude and GPT-6 Astra.