Repository navigation
build(gym): bump the Gym submodule - #5195
Conversation
|
/ok to test 313fb81 |
313fb81 to
1fb5715
Compare
|
/ok to test 1fb5715 |
1fb5715 to
1cd7285
Compare
|
/ok to test 1cd7285 |
NVIDIA-NeMo#5195 moves the Gym submodule to 23557b7c2 (Gym main on 2026-11-12) and makes the recipe and test changes that bump needs. This branch pinned the Dynamo dialect (NVIDIA-NeMo/Gym#4817) on the old Gym base, so the two pins conflict. The submodule is now 234bb55da, the head of Gym#4817: the dialect rebased onto Gym main 0aedecf12, which contains 23557b7c2. Gym's dependencies are the same at both commits, so uv.lock is NVIDIA-NeMo#5195's plus this branch's own entries. Co-Authored-By: Claude Fable 5.2 <[email protected]> Signed-off-by: jthomson04 <[email protected]>
|
This bump moves Gym to These two overrides fix it in our runs: We tested them on eos with the RL nightly image ( There is also a related issue outside this bump. Forest training imports |
…m pinned to the rebased dialect) into jthomson04/dynamo-1.7 No conflicts. uv.lock still matches pyproject.toml (uv 0.13.6, lock --check). Co-Authored-By: Claude Fable 5.2 <[email protected]> Signed-off-by: jthomson04 <[email protected]>
|
/ok to test 07a716b |
07a716b to
5ff3ddf
Compare
|
/ok to test 5ff3ddf |
|
/ok to test 64e87da |
terrykong
left a comment
There was a problem hiding this comment.
Thanks for the bump. The recipe sweep checks out: no recipe is left with two agent types, and every restated block matches Gym's configs. The L0 local-sandbox override and the browsecomp fix also check out, and the new _nemo_gym_group_task_index helper is small and easy to test. CI is green on 64e87da (Lfast only); the Super 3.5 nightly is still pending, per the description.
- (C1) The sync-path task counter reuses Gym episode names after a resume, and between async validation and training.
- (C2) The PR description says the restated blocks were removed; the diff keeps them.
- (C3) The guides don't mention the three OpenSandbox variables.
- (C4) Follow-up: RL imports Gym paths that this pin deprecates.
Generated by Claude Code
|
/ok to test 8cfdc12 |
Moves the Gym submodule from 5911d628c to 23557b7c2 (Gym main on 2026-11-12). uv.lock is updated with uv 0.11.18, which keeps main's lock format: openai 2.44.0 -> 2.45.0 and nemo-gym's own requirement list. uv 0.13.6, the Dockerfile's version, accepts the file unchanged. Recipes: Gym now ships most of its bundled environment servers as single_agent_turn_legacy. RL recipes declare legacy_agent for many of the same servers on purpose, so each recipe states its path; with both, Gym refused to start the server. Each such block now also deletes single_agent_turn_legacy, so the server keeps the type the recipe declares (102 blocks in 23 files). The single_agent_turn recipe deletes single_agent_turn_legacy instead of legacy_agent. Tests: CaptureContext's rollout_id is now capture_key. The exporter test collects names from the modules that define them, since nemo_gym.openai_utils serves moved names only on request. The checkpoint adapter test's export hooks take checkpoint_id, which Gym now requires. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Zeyu Zhou <[email protected]>
At the new Gym pin, code_gen grades only in a sandbox and browsecomp no longer has a default resources server or a default host /run path. This breaks every recipe that loads code_gen, the rl-gym image build, the L0 Gym test and the browsecomp compaction test. - The 8 base recipes that load code_gen also load Gym's OpenSandbox provider config. The image, endpoint and key come from CODE_GEN_SANDBOX_IMAGE, OPENSANDBOX_DOMAIN and OPENSANDBOX_API_KEY. None are in the repository, and only Gym reads the key, so it stays out of RL's logged config. - The 3 prefetch configs that load code_gen set a placeholder image. The image build's dry run validates the image but starts no sandbox. - The 16 GPU tests whose recipes load code_gen set USES_OPENSANDBOX=1, so the internal CI can pass them the three variables. - The L0 Gym test grades code_gen with Gym's local provider, since GitHub CI has no sandbox service. - The browsecomp compaction test sets the resources server type and allow_host_execution. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Zeyu Zhou <[email protected]>
At the new Gym pin, Gym's default environment server builds a flat row's task
from _ng_task_index and names its episode "{task}-{rollout}". The async
collector stamps a run-wide counter, but the synchronous path (sync GRPO, PPO,
distillation, validation, the L0 Gym test) did not, so every flat row it sent
to that server failed with KeyError '_ng_task_index'.
_prepare_nemo_gym_rows now gives each flat prompt group one task index from a
process-wide counter, and keeps an index the rows already carry. Materialized
rows are unchanged: they carry their own task ID, and the NeMo-Gym actor names
their synchronous episodes by prompt group.
The task-index check now runs per prompt group: the synchronous path hands in
a whole batch of several groups, whose result carries no single task index.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Zeyu Zhou <[email protected]>
…en sandbox
Rows that take their task index from the process-wide counter now also name
their episode with _ng_rollout_id (prompt group ID, rollout index and
attempt), the format the NeMo-Gym actor already uses for materialized rows.
Gym keys captures and exports on the episode name, and the counter restarts
with each process and counts apart from the async collector's, so
"{task}-{rollout}" could repeat after a restart or between async validation
and training.
Docs: the environments guide gains a NeMo Gym Code Generation Sandbox
section (the three variables, and running without OpenSandbox), and the
Nemotron 3 Nano, Super and Ultra and Nemotron 3.5 Lightning guides set the
variables in their launch instructions. The workplace_assistant recipe's
commented code_gen entry gains the commented OpenSandbox entry.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Zeyu Zhou <[email protected]>
8cfdc12 to
b2e5b01
Compare
|
/ok to test b2e5b01 |
… two-phase SimpleStorage checkpoint capture) into jthomson04/dynamo-gym No conflicts. main now has NVIDIA-NeMo#5195, so this branch's diff against main no longer includes it, and it brings NVIDIA-NeMo#5195's code_gen fix for the Gym rollout test. The Gym pin stays 9e2e5d0ad0, which contains main's 23557b7c2a. uv.lock and pyproject.toml are unchanged and equal main's. Co-Authored-By: Claude Fable 5.2 <[email protected]> Signed-off-by: jthomson04 <[email protected]>
Re-lock uv.lock on the branch lock against main's bumped Gym submodule. Signed-off-by: Meng Xin <[email protected]>
Signed-off-by: seonjinn <[email protected]>
…ture path After the rebase onto #4979, both native and Dynamo calls restore through prompt_and_capture.start_capture, which now carries the restored routes and sampler top-k on RestoredCall. Test that path and run router replay with prefix recovery behind Dynamo: - The restored-call wiring test asserts the routes and top-k reach the call's capture, and that a prefix that had already finished answers with its restored routes. - Fakes of resolve_restore return _ResolvedGenerationCut, and the fake chat handler worker sets _cut_routes_dtype. - run_prefix_recovery_phases sets PHASE1_RUN_LOG, so stop_phase1 cleans up phase one's Dynamo services for every caller. - L1_Functional_Tests_Dynamo.sh runs the router-replay prefix-recovery test behind Dynamo on the tiny DeepSeek model. - The router-replay prefix test serves string_match's environment server through legacy_agent: the Gym bump (#5195) made it typed, which prefix recovery refuses. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Anish Mahishi <[email protected]>
…ture path After the rebase onto #4979, both native and Dynamo calls restore through prompt_and_capture.start_capture, which now carries the restored routes and sampler top-k on RestoredCall. Test that path and run router replay with prefix recovery behind Dynamo: - The restored-call wiring test asserts the routes and top-k reach the call's capture, and that a prefix that had already finished answers with its restored routes. - Fakes of resolve_restore return _ResolvedGenerationCut, and the fake chat handler worker sets _cut_routes_dtype. - run_prefix_recovery_phases sets PHASE1_RUN_LOG, so stop_phase1 cleans up phase one's Dynamo services for every caller. - L1_Functional_Tests_Dynamo.sh runs the router-replay prefix-recovery test behind Dynamo on the tiny DeepSeek model. - The router-replay prefix test serves string_match's environment server through legacy_agent: the Gym bump (#5195) made it typed, which prefix recovery refuses. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Anish Mahishi <[email protected]>
…ture path After the rebase onto #4979, both native and Dynamo calls restore through prompt_and_capture.start_capture, which now carries the restored routes and sampler top-k on RestoredCall. Test that path and run router replay with prefix recovery behind Dynamo: - The restored-call wiring test asserts the routes and top-k reach the call's capture, and that a prefix that had already finished answers with its restored routes. - Router-replay and score-centering hosting tests restore through start_capture on a real worker and check the trained row: the routes keep the saved prefix's rows, the sampler top-k starts with them, and a prefix that had already finished stages its saved rows alone. - Fakes of resolve_restore return _ResolvedGenerationCut, and the fake chat handler worker sets _cut_routes_dtype. - run_prefix_recovery_phases sets PHASE1_RUN_LOG, so stop_phase1 cleans up phase one's Dynamo services for every caller. - L1_Functional_Tests_Dynamo.sh runs the router-replay prefix-recovery test behind Dynamo on the tiny DeepSeek model. - The router-replay prefix test serves string_match's environment server through legacy_agent: the Gym bump (#5195) made it typed, which prefix recovery refuses. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Anish Mahishi <[email protected]>
…ture path After the rebase onto #4979, both native and Dynamo calls restore through prompt_and_capture.start_capture, which now carries the restored routes and sampler top-k on RestoredCall. Test that path and run router replay with prefix recovery behind Dynamo: - The restored-call wiring test asserts the routes and top-k reach the call's capture, and that a prefix that had already finished answers with its restored routes. - Router-replay and score-centering hosting tests restore through start_capture on a real worker and check the trained row: the routes keep the saved prefix's rows, the sampler top-k starts with them, and a prefix that had already finished stages its saved rows alone. - Fakes of resolve_restore return _ResolvedGenerationCut, and the fake chat handler worker sets _cut_routes_dtype. - run_prefix_recovery_phases sets PHASE1_RUN_LOG, so stop_phase1 cleans up phase one's Dynamo services for every caller. - L1_Functional_Tests_Dynamo.sh runs the router-replay prefix-recovery test behind Dynamo on the tiny DeepSeek model. - The router-replay prefix test serves string_match's environment server through legacy_agent: the Gym bump (#5195) made it typed, which prefix recovery refuses. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Anish Mahishi <[email protected]>
What does this PR do ?
Moves the Gym submodule from 5911d628c to 23557b7c2 (Gym main on 2026-11-12) and fixes what the bump breaks.
uv.lock: openai 2.44.0 → 2.45.0 and nemo-gym's requirement list. Written with uv 0.11.18, which keeps main's lock format; uv 0.13.6 accepts it unchanged.single_agent_turn_legacy. RL recipes restate many of them aslegacy_agent, so those servers got both types and Gym refused to start them. Each restated block now also deletes Gym's type with_delete_key: single_agent_turn_legacyand keepslegacy_agent(102 blocks in 23 files). Thesingle_agent_turnrecipe deletessingle_agent_turn_legacyinstead oflegacy_agent.code_gen: at this pin it grades only in a sandbox. The 8 base recipes that load it also load Gym's OpenSandbox provider config, which readsCODE_GEN_SANDBOX_IMAGE,OPENSANDBOX_DOMAINandOPENSANDBOX_API_KEYfrom the launch environment; none of them is in the repository, and only Gym reads the key. The 3 prefetch configs set a placeholder image for the image build's dry run. The 16 GPU tests that loadcode_gensetUSES_OPENSANDBOX=1, so nemo-ci passes them the three variables. The L0 Gym test gradescode_genwith Gym's local provider. The environments guide documents the variables and how to run without OpenSandbox, and the Nemotron 3 Nano, Super and Ultra and Nemotron 3.5 Lightning guides set them.allow_host_execution, which Gym's browsecomp agent no longer defaults._ng_task_index. The synchronous path (sync GRPO, PPO, distillation and validation) now gives each flat prompt group a task index, and names its episodes with_ng_rollout_id(prompt group ID, rollout index and attempt), so names do not repeat after a restart or between async validation and training. The task-index check runs per prompt group.CaptureContexttakescapture_key, the exporter test collects names from the modules that define them, and the checkpoint adapter test's export hooks takecheckpoint_id.rollout_recovery.target_levelturnandprefixfor environment servers that are notlegacy_agent. That now includes Gym's bundled servers that a recipe loads without restating them. No recipe sets those levels; the default issibling.Validation
env.nemo_gym, composed through Gym's parser: 36 recipes failed at 23557b7c2 before this change and none after; the 5 that also fail on main are unchanged.grpo-nanov3-30BA3B-2n8g-megatron_generation-noncolocated-async-gym-quickpassed at 5ff3ddf.🤖 Generated with Claude Code