Repository navigation
Conversation
Since v0.6.0, `gym dataset collate` strips `agent_ref` and stamps each row with `task_source`, the config instance that declared its dataset. NeMo Gym resolves it to an agent when rollouts are dispatched. The data and training pages still said collate adds `agent_ref`, and the multi-environment page built its mixed dataset by hand-stamping `agent_ref`, which now routes through the deprecated path and duplicates rows on rerun. Describe `task_source` routing and `+agent_map` in the data docs and the NeMo RL tutorial, and build the multi-environment dataset with `gym dataset collate --resources-server A --resources-server B`. The veRL recipe still reads `agent_ref` from each row and rejects rows without it, so the veRL page now adds `agent_ref` from `task_source` after collating. Refs NVIDIA-NeMo#4669 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
prepare-validate.mdx step 5 still said collate combines samples with agent references. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
yaoyu-33
marked this pull request as ready for review
October 16, 2026 21:34
Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
- Drop the DeprecationWarning promise for agent_ref-only rows: on real dispatch paths Python's default filters hide it. - Say that the two example environments have no public training data, so train_preparation does not apply to them. - In the veRL page, give the rule Gym uses to pick the agent for a dataset declared on a resources server. - In the CLI reference, mark collate's --resources-server as repeatable and key --num-repeats by task_source, not agent_ref.name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: yaoyu-33 <yaoyu.094@gmail.com>
This was referenced Oct 19, 2026
This branch has not been deployed
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?
Updates the data and training docs to match how rows are routed today.
Since v0.6.0 (#2717),
gym dataset collateworks like this:agent_reffrom the source data.task_source, which is the config instance that declared the row's dataset (nemo_gym/train_data_utils.py).task_sourceto an agent at dispatch, inRolloutCollectionHelper.resolve_task_sources, called fromrun_examples,preprocess_examplesandrun_from_config.agent_refand notask_sourcelog aDeprecationWarning.The docs still said collate adds
agent_ref, and the multi-environment page hand-stampedagent_refwithjq … >>. That uses the deprecated path and duplicates rows on rerun.Changes:
data/index.mdx:task_source, with+agent_mapfor rerouting.data/prepare-validate.mdx,data/download-huggingface.mdx: say collate addstask_source, including the collate step in the validation-process list.training-tutorials/nemo-rl-grpo/setup.mdx: explainstask_source. NeMo RLmainresolves it through Gym'srun_examples, and RLmainpinned Gymda9f67149when this PR was opened and now pinsad4f4804f; both include feat(data): collate stamps task_source; datasets declarable on resources servers #2717.training-tutorials/multi-environment-training.mdx: builds the mixed dataset withgym dataset collate --resources-server A --resources-server Binstead ofjq.training-tutorials/verl.mdx:agent_ref. It reads it from each row and rejects rows without it (verl-recipe/nemo_gym/agent_loop.py:raise ValueError(f"dataset row {i} is missing agent_ref")).dataset.pyalready forwardstask_sourcethroughextra_env_info, but theagent_refcheck rejects the row first (verl-recipe81d78276,agent_loop.py:291-292).agent_reffromtask_sourceafter collating, and shows the same flow for multi-environment collation.Issue
Closes #4669 (Linear GYM-1082, part of the GYM-1080 docs audit).
Validation
gym dataset collate --model-type openai_model --resources-server example_single_tool_call --resources-server example_multi_step --mode example_validation. It writes oneexample.jsonlwith 10 rows and noagent_ref:task_source = example_single_tool_call_simple_agent(5 rows)task_source = example_multi_step_simple_agent(5 rows)RolloutCollectionHelper.resolve_task_sourceswith the mergedenv startconfig for both servers. Each resolved to its own agent (5 and 5), with noDeprecationWarning.jqflow: rows with onlyagent_reflog5 rows routed via their baked-in agent_ref (no task_source). This legacy path is deprecated….jqstamp: ran it on the collated file. Every row gainsagent_ref.name == task_source.workplace_assistantandmath_with_judgeboth declare their datasets on their agent instance, sotask_sourceis the agent name, as the veRL page says.main(nemo_rl/environments/nemo_gym.py) callsrun_examples, which resolvestask_sourcetoagent_ref, and falls back totask_sourcefor route names.prepare-validate.mdx("Combine samples with agent references"). A grep offern/versions/latest/pagesfinds no other page saying collate addsagent_ref. The remainingagent_refmentions describe rollout output, where it is still correct, except two inreference/cli-commands.mdxthat the review-fix commit below corrects.pre-commit run --files: pass.a251904f5):data/index.mdxno longer promises aDeprecationWarningforagent_ref-only rows: ongym eval runandrun_examples, Python's default filters hide it.multi-environment-training.mdx:--mode train_preparation --downloadfails for both example environments (one declares no training data; the other downloads from an internal GitLab), so the page says they have no public training data.verl.mdxgives the rule Gym uses to pick the agent for a dataset declared on a resources server.reference/cli-commands.mdx: collate's--resources-serveris marked repeatable, and--num-repeatskeys are described astask_source.pytest tests/unit_tests/test_fern_docs_links.py: 24 passed.pre-commit run --files: pass.pre-commit run --all-files: pass.cd fern && npm run check: 0 errors. The only warning is the redirects check, skipped withoutfern login.Rollout evidence
N/A. This is a docs-only change and no runtime behavior changes. Routing was checked with Gym's own resolver on real collated output, as listed above.
Compatibility / follow-ups
agent_refafter collating, as the page now shows. The recipe's own README still says rows needagent_ref.agent_refcheck inagent_loop.py.task_sourcealready reachesrun_examples, which resolves it toagent_refthe way it does for NeMo RL. That would remove the extra step.🤖 Generated with Claude Code