grade_answer_verl fails when rm_type="boxed_math" strips the \boxed{} wrapper upstream
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 8.5k
- Forks
- 1.3k
- Avg merge
- 5h 36m
- Merged PRs (30d)
- 22
Description
The “boxed” reward shortcuts (rm_type="boxed_math", "boxed_dapo", etc.) already strip the LaTeX box around the response before calling grade_answer_verl. However, grade_answer_verl still assumes the solution string contains a \boxed{} and unconditionally calls extract_answer(solution_str). Because the wrapper has already been removed, extract_answer returns None, the helper immediately returns False, and the rollout get scored as incorrect even when the numeric answer matches the label.
Where
- slime/slime/rollout/rm_hub/init.py lines 28–37: the rm_type.startswith("boxed_") branch reassigns response = extract_boxed_answer(response) or "" before dispatching to grade_answer_verl.
- slime/slime/rollout/rm_hub/math_utils.py lines 487–494: grade_answer_verl always parses the response with extract_answer(solution_str).
Steps to Reproduce
- Use rm_type="boxed_math" when calling async_rm.
- Feed a sample whose response ends with Answer: \boxed{5}.
- Because of the boxed prefix, init.py strips the wrapper, so solution_str is just "5" when it reaches grade_answer_verl.
- extract_answer("5") returns None; the function returns False, yielding reward 0.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in slime/slime/rollout/rm_hub/init.py at the rm_type.startswith("boxed_") branch, then read grade_answer_verl in slime/slime/rollout/rm_hub/math_utils.py. Reproduce the boxed_math path with a response ending in Answer: \boxed{5}, and verify that the stripped response is graded correctly instead of returning False.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- ai
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 78/100