Fix nested boxed answer parsing 🤖🤖🤖 - #254
Open
cupkk wants to merge 1 commit into
Open
Conversation
Signed-off-by: Haijie Zhi <133995660+cupkk@users.noreply.github.com>
cupkk
force-pushed
the
fix/nested-boxed-metrics
branch
from
July 31, 2026 01:47
234974d to
61bbffb
Compare
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.
PR description
AIME25 and Math500 currently extract a boxed answer by splitting at the first closing brace. Nested LaTeX such as
\boxed{\frac{1}{2}}is therefore truncated to\frac{1, causing a correct model answer to be scored as incorrect.Add a shared balanced-brace parser and use it in both benchmarks. AIME25 keeps its existing behavior of selecting the last boxed answer, while Math500 continues to select the first. The focused tests cover nested LaTeX, first/last selection, missing answers, and unmatched braces.
Local verification:
The three focused tests pass. The full test suite and
make stylewere not run because this minimal environment intentionally did not install PyTorch, Transformers, datasets, or the development toolchain.AI assistance: Codex helped inspect the repository, draft the focused implementation, and prepare the tests. I reviewed every changed line and verified the behavior and remote diff.
Checklist
Before submitting a PR, please make sure:
Tests are working (
make test)Code is formatted correctly (
make style, on errors try fix withmake format)Copyright header is included
All commits are signed-off using
git commit -s(new press)
mypress_press.pyis in thepressesdirectory (not applicable)(new press)
MyPressis in__init__.py(not applicable)(new press)
README.mdis updated with a 1 liner about the new press in the Available presses section (not applicable)(new press) New press is in the
default_presseslist intests/default_presses.py(not applicable)(new press) A docstring is provided that follows the same structure as the existing ones (not applicable)
🤖🤖🤖