fix: validate DAPO integer labels without float coercion#2203
Open
morluto wants to merge 2 commits into
Open
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
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.
Problem
The DAPO scorer canonicalizes ground-truth labels with
int(float(gt)). That conversion can change the reward result:"0.5"becomes"0", so a prediction of0is incorrectly accepted.9007199254740993no longer matches itself.DAPO-Math-17K defines its labels as integers, so the scorer should validate that contract instead of truncating or rounding labels.
Change
Decimalrather than binary floating point.ValueError.General symbolic verification and the
rm_type=mathpath are intentionally unchanged.Verification
origin/main: failed because0.5was accepted as0and9007199254740993was rounded.PYTHONPATH=. /tmp/slime-dapo-venv/bin/python -m pytest -q tests/test_rm_math_dapo.py— 34 passed.ruff check slime/rollout/rm_hub/math_dapo_utils.py tests/test_rm_math_dapo.py— passed.uvx --from black==24.3.0 --with click==8.0.2 black --check slime/rollout/rm_hub/math_dapo_utils.py tests/test_rm_math_dapo.py— passed.