Repository navigation
Conversation
Add open-r1/OpenR1-Math-220k as a built-in response dataset for verifiable-answer math training: a focused loader following the DeepScaler/OpenMathInstruct-2 pattern, registry entry, a mocked unit test covering the HF dataset id/config/split pass-through and emitted messages schema, and a docs update listing it among datasets supporting split_validation_size. Requested and approved in NVIDIA-NeMo#3105. Co-Authored-By: Claude Opus 4.8 <[email protected]> Signed-off-by: Tianyi Zhang <[email protected]>
d34f856 to
2e01cc4
Compare
yuki-97
left a comment
There was a problem hiding this comment.
thanks for adding this, @RayenTian to review
|
Thanks for adding this @tianyi-zhang-02 , I left some comments. |
- Rename `config_name` to `subset` so a YAML `subset:` is honored
instead of being silently swallowed by **kwargs (matches the
ResponseDataset / ResponseDatasetConfig convention).
- Move the OpenR1-specific test out of test_response_dataset_registry.py
(scoped to registry dispatch) into a dedicated
tests/unit/data/datasets/test_openr1_math_dataset.py, and add a test
asserting the default `subset` ('default') is loaded.
Addresses @RayenTian's review comments.
Co-Authored-By: Claude Opus 4.8 <[email protected]>
Signed-off-by: Tianyi Zhang <[email protected]>
|
Hi @RayenTian, thanks for your review. Both comments are addressed: config_name → subset, so a YAML subset: is honored (plus a regression test for the default-subset fallback) |
|
/ok to test 4a8f3cf |
The Lint check enforces that files with zero pyrefly errors are listed in pyrefly.toml's project-includes; the new dataset file type-checks clean, so add it to the whitelist. Co-Authored-By: Claude Fable 5 <[email protected]> Signed-off-by: Tianyi Zhang <[email protected]>
|
/ok to test 7c9ec09 |
|
LGTM! Approved! @yuki-97 Would you please also take a look? |
yuki-97
left a comment
There was a problem hiding this comment.
@tianyi-zhang-02 thanks for the contribution! overall LGTM, just one nit on test structure.
Drop the bespoke test_openr1_math_dataset.py and add
("OpenR1-Math-220k", None) to the existing
test_build_in_dataset_with_split_validation parametrize table, which
already exercises registry dispatch, split_validation, and the
messages/task_name schema (per @yuki-97's review).
Co-Authored-By: Claude Fable 5 <[email protected]>
Signed-off-by: Tianyi Zhang <[email protected]>
|
Thanks @yuki-97 @RayenTian! Applied some changes in |
|
/ok to test 428f4ff |
yuki-97
left a comment
There was a problem hiding this comment.
LGTM, thanks @tianyi-zhang-02
Follows the precedent set for OpenR1-Math-220k in NVIDIA-NeMo#3131: add the dataset to test_build_in_dataset_with_split_validation with its own assertion branch, so registry dispatch, split_validation and the emitted schema are exercised against real data. The real-data assertion checks the property this loader exists for — no sentinel answer survives the default filters. Keeps the dedicated file for the filter behavior itself, which needs controlled source rows (one per exclusion reason) that a real-data test cannot express; the module docstring now says so. Co-Authored-By: Claude Fable 5 <[email protected]> Signed-off-by: Tianyi Zhang <[email protected]>
pyrefly caught a real defect: ResponseDatasetConfig types subset as `str | None`, and the config examples in both guides literally show `subset: null`, but the loaders annotated it `str` and passed it straight to load_dataset. Neither openai/gsm8k nor open-r1/OpenR1-Math-220k has an implicit default config, so a config with `subset: null` would have failed at load time. Widen both annotations to `str | None` (matching ResponseDataset and ArrowTextDataset) and fall back to the dataset's default config when None. openr1_math.py has the same defect on main, introduced in NVIDIA-NeMo#3131, so it is fixed here too. Adds a regression test for the None case. Co-Authored-By: Claude Fable 5 <[email protected]> Signed-off-by: Tianyi Zhang <[email protected]>
Summary
Adds
open-r1/OpenR1-Math-220kas a built-in response dataset for verifiable-answer math training.Changes:
OpenR1Math220KDatasetOpenR1-Math-220kin the responseDATASET_REGISTRYtests/unit/data/datasets/test_openr1_math_dataset.py) covering the Hugging Face dataset id/subset/split and emittedmessagesschema, plus a regression test for the default subsetTraceability
Requested and approved in #3105.
Closes #3105.
Author: @tianyi-zhang-02
cc @yuki-97
Notes
The wrapper follows the same lightweight pattern as existing math response datasets such as
GSM8KDatasetandDeepScalerDataset: it mapsproblemandanswerinto the existing two-message response dataset shape and leaves reward handling to the existing math environment/data processor path.subset(the HF config name, matching theResponseDatasetConfig/ResponseDatasetconvention) defaults todefault, withsplitdefaulting totrain. Users can pass another OpenR1-Math-220k config such asallviasubset:in the response dataset config.Review follow-ups (193bd86)
config_name→subsetso a YAMLsubset:is honored instead of being silently swallowed by**kwargs(per @RayenTian's review).test_response_dataset_registry.pyinto a dedicatedtest_openr1_math_dataset.py, following thetest_mmpr_tiny.pypattern.Validation
ruff check/ruff format --checkon the three touched Python files — cleanpython -m py_compileon the three touched Python files — OKsubset: all→ HF configall), default subset fallback, and the emitted two-message schema