Repository navigation
Conversation
Move the Gym submodule from 91666f9 to 98458af (latest Gym main, 192 commits). uv.lock is re-locked in a follow-up commit. Signed-off-by: Terry Kong <[email protected]>
1 task done
Gym 98458af needs hydra-core>=1.4.0rc3, but Megatron-Bridge pins hydra-core<1.4, so nemo-rl[mcore] and nemo-rl[nemo-gym] could not be locked together. Widen Bridge's Hydra range to <1.5 with a package-scoped override, the same fix as #5484. The sglang and trtllm extras keep hydra-core 1.3.7 and omegaconf 2.3.1: tensorrt-llm caps omegaconf below the 2.4 line that Hydra 1.4 needs. Every other extra moves to hydra-core 1.4.0rc3 and omegaconf 2.4.1rc4. No other package versions change. Signed-off-by: Terry Kong <[email protected]>
Collaborator
Author
|
/ok to test 6d4f174 |
terrykong
marked this pull request as ready for review
December 4, 2026 08:27
The first re-lock kept hydra-core 1.3.7 and omegaconf 2.3.1 for the sglang and trtllm extras because uv prefers versions already in the lock. Nothing requires them: a second `uv lock` moves every extra to hydra-core 1.4.0rc3 and omegaconf 2.4.1rc4, and `uv lock --check` (the Lockfile freshness check) only passes on that result. Signed-off-by: Terry Kong <[email protected]>
Collaborator
Author
|
/ok to test 3858791 |
terrykong
commented
Dec 4, 2026
terrykong
left a comment
Collaborator
Author
There was a problem hiding this comment.
Self-review of the Gym bump at 3858791. Nothing blocks merge except C1.
Verdict. The bump is right. The Gym pin is on Gym main and moves 192 commits forward, and the lock now has one Hydra (1.4.0rc3) and one OmegaConf (2.4.1rc4) for every extra. The Megatron-Bridge override is the smallest fix, because Bridge main still caps Hydra below 1.4.
What we checked
- Config loading: ran RL's real
load_config, resolvers and Hydra override parsing over every shipped YAML, on both OmegaConf 2.3.1 / Hydra 1.3.7 and 2.4.1rc4 / 1.4.0rc3, in three separate checks. Resolved values were identical. Config unit tests gave the same result on both versions (677 passed; the same 4 failures on both, caused by the local machine setup). - Megatron-Bridge and Megatron-LM Hydra/OmegaConf code (
omegaconf_utils,instantiate): same output on both version pairs. - Gym: all 140 RL imports resolve at the new pin; the Gym values RL copies (failure kinds, sampling keys) still match; the checkpoint format did not change.
- No locked package sets an OmegaConf or Hydra limit that the new versions break (TRT-LLM lists plain
omegaconf). Old pickled and saved configs load on 2.4. - Lint on the changed files passed;
uv lock checkpassed on this head.
Minor, not blocking
- OmegaConf 2.4 deprecates
register_new_resolver, so each launch prints 4 warnings fromregister_omegaconf_resolvers. Switching toregister_resolveris only safe once RL requires OmegaConf ≥2.4 (on 2.3 that name passes strings, so${mul:2,3}breaks). Do it when 2.4.1 ships as a stable release. - The override comment at pyproject.toml#L507 doesn't say when to remove it, and nothing upstream asks Bridge to allow Hydra 1.4 (Bridge main pyproject.toml#L91). A Bridge PR that allows
<1.5, linked from that comment and from "Needs upstream changes", would let us drop the override later. - OmegaConf 2.4.1rc4 is a one-day-old pre-release. Gym's minimum version forces it, so there is no way around it.
Before merge
- (C1) Make RL use the head-server port Gym actually bound.
- Fill in the proof section: link the green L1 run and the Nano Gym nightlies on H100 and GB200.
- Description: write
NVIDIA-NeMo/Gym#6846(a bare#6846links to an RL issue that doesn't exist). The line "50 imports now go through Gym's moved-path redirects" is wrong: RL used those redirects before this bump too, and we count about 90 import statements in 18nemo_rl/files.
nemo-rl-review: kind=self harness=claude-code/2.1.336 model=claude-opus-5-5 effort=medium review-pr-team=v3 reviewed=3858791
Gym requires hydra-core>=1.4.0rc3, its security floor that only exists on the 1.4 pre-release line, but Megatron-Bridge caps hydra-core <1.4. The package-scoped override replaces Bridge's whole Hydra requirement, so this comment is the only place that says why. Carried over from the review of #5484 (C2). Comment only: uv.lock is unchanged. Signed-off-by: Terry Kong <[email protected]>
RL picks the Gym head-server port and writes it into Gym's config. If the head server cannot bind it, Gym's RunHelper.start() moves it to a fresh port in its global config and restarts every server, but RL kept building its rollout client from the port it picked. With this Gym bump (NVIDIA-NeMo/Gym#6849) that also happens when another Gym run already answers on the port, so RL could send rollouts to the other run. Read the port back from Gym's global config right after start(), before the rollout client is built. Test: a fake RunHelper.start() moves the head port; the head server config and the rollout client must use the new port. It fails without the fix (11000 != 11500). Signed-off-by: Terry Kong <[email protected]>
Collaborator
Author
|
/ok to test 73b1dc8 |
The pre-commit taplo hook expands the inline dependency list; the Lint check failed on the one-line form. Signed-off-by: Terry Kong <[email protected]>
Collaborator
Author
|
/ok to test 27af457 |
_spinup now imports nemo_gym.global_config to read back the head-server port, so the helper that stands in for the Gym modules must provide it. Signed-off-by: Terry Kong <[email protected]>
Collaborator
Author
|
/ok to test 909157b |
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 and why
Moves the Gym submodule from
91666f9to98458af, the latest Gymmain(192 commits).Lock fix. New Gym needs
hydra-core>=1.4.0rc3, but Megatron-Bridge pinshydra-core<1.4, somcoreandnemo-gymcould not be locked together. A package-scoped override widens Bridge's range to<1.5, the same fix as #5484. The lock then moves Hydra to 1.4.0rc3 and OmegaConf to 2.4.1rc4 for every extra, so every RL install now gets these release candidates. No other package versions change. The override's comment says to remove it once Bridge allows Hydra 1.4.Head-server port fix. If the Gym head server can't bind the port RL picked, Gym moves it to a new port, but RL kept using the old one. This bump brings in NVIDIA-NeMo/Gym#6849, which also moves the port when another Gym run already answers on it, so RL could send rollouts to the other run. RL now reads the port back from Gym's config after startup. A unit test covers it and fails without the fix.
RL code. Gym reorganized its package, but every name RL imports still resolves. 50 imports now go through Gym's moved-path redirects, which emit a
DeprecationWarninguntil Gym 0.10.0. Moving them to the new paths can be a follow-up.From #5484. Only the Hydra override is needed here. Checkpoint schema v3 and the docs about masked config are already on main (from #5432). #5484's own Gym pin needs Gym #6846 (looping metrics), which this bump doesn't need.
uv.lockre-lockedIssues
None
Convergence / perf / functionality proof
Pending: L1 CI, and the Gym bump nightly tests for Nano on H100 and GB200, which will post their results here. The Super 120B Gym test is skipped for this bump.
Needs upstream changes
None
PR commands and CI
CI:Lfast: the default for most PRs. Runs a fast test subset.CI:L1: dependency or container changes (pyproject.toml,uv.lock,Dockerfile) or broad core changes. Builds a new image and runs unit and functional tests.CI:docs: docs-only changes. Runs doc tests only./ok to test <full-commit-sha>: start CI for that commit. Post again after each push./nightly-ci test-case=<test>: run NVIDIA's nightly CI for the PR head; eligible teams only./review: automated review comments. Addmode=strictfor a stricter review,reset=truefor a fresh full review./resolve-conflict: Autobot mergesmaininto this PR and resolves the conflicts. PRs from forks must allow edits by maintainers./review-pr-team <pr-number>for a team review before you ask for human review.🤖 Generated with Claude Code