Repository navigation
Conversation
GSM8KDataset hardcoded the "main" Hugging Face config, so a configured `subset` was silently ignored — `openai/gsm8k` also ships a "socratic" config. Thread `subset` through to `load_dataset` (default "main", so existing behavior is unchanged). This is the example the dispatcher guard added in NVIDIA-NeMo#3271 warns about, which now resolves for gsm8k. Also correct the split_validation_size docs. Both guides enumerated the supporting datasets, but the lists had drifted: sft.md listed 4 and grpo.md 5, while 12 built-in datasets call split_train_validation today (arrow_text, audiomcq, avqa, daily_omni, general_conversations, mmpr_tiny, nemotron_cascade2_sft, oasst, openmathinstruct2, openr1_math, response_dataset, tulu3). Replace the enumeration with the rule that determines support — the class calls split_train_validation — keeping the common datasets as examples, so the docs cannot drift again, and note that unsupported keys now warn rather than being silently dropped. Co-Authored-By: Claude Fable 5 <[email protected]> Signed-off-by: Tianyi Zhang <[email protected]>
3 tasks done
yuki-97
reviewed
Jul 30, 2026
yuki-97
left a comment
Contributor
There was a problem hiding this comment.
LGTM, thanks @tianyi-zhang-02 , only small nits.
- Drop the now-stale `subset` on GSM8KDataset example from the guard's inline comment and helper docstring: this PR fixes that hardcode, so the example no longer holds. The split_validation_size example stays, since it remains accurate. - Remove the unused `system_prompt_file` parameter from GSM8KDataset; it is read from the data config by set_task_spec, and it is not a behavioral key, so the dispatcher guard stays silent on it. Addresses @yuki-97's review comments. Co-Authored-By: Claude Fable 5 <[email protected]> Signed-off-by: Tianyi Zhang <[email protected]>
yuki-97
previously approved these changes
Jul 31, 2026
yuki-97
left a comment
Contributor
There was a problem hiding this comment.
LGTM, thanks @tianyi-zhang-02
Contributor
|
/ok to test 7dcb8b6 |
yuki-97
enabled auto-merge (squash)
July 31, 2026 11:10
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]>
…com/tianyi-zhang-02/RL into fix/gsm8k-subset-and-val-split-docs
auto-merge was automatically disabled
July 31, 2026 18:31
Head branch was pushed to by a user without write access
Contributor
Author
|
Updated |
Contributor
Author
|
Current with main. Ready whenever you get a chance, @yuki-97. Thanks! |
Contributor
|
/ok to test afaf32c |
yuki-97
enabled auto-merge (squash)
August 3, 2026 05:09
Contributor
|
/ok to test 984dbfb |
yuki-97
approved these changes
Aug 3, 2026
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.
What does this PR do ?
Two small follow-ups to the config-key guard merged in #3271.
1.
GSM8KDatasetnow honorssubset. It hardcoded the"main"Hugging Face config, so a configuredsubsetwas silently ignored —openai/gsm8kalso ships a"socratic"config (same questions, answers interleaved with Socratic sub-questions).subsetis now threaded toload_dataset, defaulting to"main"so existing behavior is unchanged. This is exactly the example the #3271 guard warns about, so that warning now resolves into working behavior forgsm8k.2. The
split_validation_sizedocs were stale. Both guides enumerated the supporting datasets, and the lists had drifted:docs/guides/sft.mddocs/guides/grpo.mdsplit_train_validationA reader would wrongly conclude the 7 unlisted datasets can't carve a validation split. Rather than re-listing 12 names that will drift again, the docs now state the rule that determines support (the dataset class calls
split_train_validation), keep the common datasets as examples, and note that an unsupported key now warns rather than being silently dropped (#3271).Issues
Follow-up to #3270 / #3271. No new issue filed — these are small corrections in the same area.
Usage
Before your PR is "Ready for review"
test_gsm8k_subset_selects_hf_config(assertssubsetreachesload_datasetand answer extraction still works) andtest_gsm8k_subset_defaults_to_main(backward compatibility), following the mocked pattern used by the AIME test in the same file.ruff check/format --checkclean;pyrefly==0.24.2reports 0 errors ongsm8k.py(it is inproject-includes); all doc links resolve.cc @yuki-97 @RayenTian