Skip to content

ci: Bump Gym to 91666f9 - #5432

Merged
yuki-97 merged 10 commits into
mainfrom
ci/bump-gym-91666f9-20261124-120603
Dec 4, 2026
Merged

yuki-97 merged 10 commits into
mainfrom
ci/bump-gym-91666f9-20261124-120603

Conversation

@svcnvidia-nemo-ci

@svcnvidia-nemo-ci svcnvidia-nemo-ci commented Nov 24, 2026 •

Copy link
Copy Markdown
Contributor

Automated Gym dependency bump. Updated submodule pointer to 91666f99091979a03d78b76558851f5bf1bbf43a and regenerated uv.lock (deps auto-flow from the submodule pyproject.toml).

Gym CI results

Gym tests run on commit edab3c2. Curves vs each test's recent history: W&B report

Test GPUs Result W&B run Metric checks Check result
grpo-nanov3-30BA3B-4n4g-megatron_generation-colocated-reshard-async-gym-quick GB200 4x4 ✅ passed ca3b33mi median(data["train/gen_kl_error"]) < 1.3 ✅ 0.01584
grpo-nanov3-30BA3B-4n4g-megatron_generation-noncolocated-async-gym-quick GB200 4x4 ✅ passed yb9dv9nj median(data["train/gen_kl_error"]) < 1.3 ✅ 0.01651
grpo-nemotron3.5-super-120BA12B-56n4g-megatron-rlvr-single-controller-gym-quick GB200 56x4 ❌ failed none data["train/token_mult_prob_error"]["3"] < 1.1
max(data["train/gen_kl_error"]) < 0.005
max(data["train/reward"]) > 0.0
max(data["train/genrm_simple_agent/reward/mean"]) > 0.0
max(data["train/lc_judge_simple_agent/reward/mean"]) > 0.0
max(data["train/jailbreak_refusal_with_explanation/reward/mean"]) > 0.0
⚠️ not run
⚠️ not run
⚠️ not run
⚠️ not run
⚠️ not run
⚠️ not run
grpo-nanov3-30BA3B-2n8g-megatron_generation-colocated-reshard-async-gym-quick H100 2x8 ✅ passed 31voqelz median(data["train/gen_kl_error"]) < 1.3 ✅ 0.002241
grpo-nanov3-30BA3B-2n8g-megatron_generation-noncolocated-async-gym-quick H100 2x8 ✅ passed b5g3y4lp median(data["train/gen_kl_error"]) < 1.3 ✅ 0.01647

Signed-off-by: nemo-ci-bot <[email protected]>
@svcnvidia-nemo-ci svcnvidia-nemo-ci added the CI:L1 Run doctests, unit tests, and functional tests label Nov 24, 2026
@copy-pr-bot

copy-pr-bot Bot commented Nov 24, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@svcnvidia-nemo-ci

Copy link
Copy Markdown
Contributor Author

/ok to test 7b83eae

@github-actions

Copy link
Copy Markdown

✅ Submodule Fast-Forward Check Results

Check based on commit: 7b83eae (PR #5432 from ci/bump-gym-91666f9-20261124-120603)

✅ Submodules that are properly updated:

Gym: ✅ PR branch is ahead of main branch (fast-forward)

All submodule changes look good! ✨

…tures Messages

NVIDIA-NeMo/Gym#5771 added source-history capture for Messages harnesses, so
a Messages request on the capture route is forwarded to the model instead of
being refused with a 422. The case asserted a limitation that is gone; the
Responses and Chat cases still cover the gaps that remain.

Signed-off-by: Marc Romeyn <[email protected]>
…stance and model server

Since NVIDIA-NeMo/Gym#5251, Gym resolves a call's parent only among the calls
of the same agent instance and model server. The test's after-restart context
set neither, so it searched an empty scope and found no chain. It now carries
the identity of the calls it continues, as the model server's own context does.

Signed-off-by: Marc Romeyn <[email protected]>
@marcromeyn

Copy link
Copy Markdown
Contributor

/ok to test 044e434

@github-actions

Copy link
Copy Markdown

✅ Submodule Fast-Forward Check Results

Check based on commit: 044e434 (PR #5432 from ci/bump-gym-91666f9-20261124-120603)

✅ Submodules that are properly updated:

Gym: ✅ PR branch is ahead of main branch (fast-forward)

All submodule changes look good! ✨

@marcromeyn

Copy link
Copy Markdown
Contributor

@terrykong this bump needs two test updates, both pushed here (044e434):

  1. The Messages capture-gap case, as on ci: Bump Gym to bfd253b #5401: since NVIDIA-NeMo/Gym#5771, Gym captures Messages requests instead of refusing them with a 422, so that case is dropped.
  2. test_ledger_growth_and_restart_preserve_segment_chains: since NVIDIA-NeMo/Gym#5251, Gym resolves a call's parent only among the calls of the same agent instance and model server. The test's after-restart CaptureContext set neither, so it found an empty chain. It now passes the recorded calls' identity, as Gym's model server does for real calls.

#5401 only showed the second failure because the unit tests stop at the first one (-x), so there may be more behind it. I'll follow up here if CI finds any. Both fixes need this Gym pin, so they can't go to main separately. Could you approve the CICD run (it's waiting in the test approval queue) and merge this before tomorrow's automated bump replaces it?

@marcromeyn

Copy link
Copy Markdown
Contributor

@terrykong the rerun of the failed jobs at 044e434cd is back. L1 Dynamo passed this time (its prefix-recovery parity check set aside 2 of 8 rows yesterday, more than the 1 it allows), so that one looks like a near-tie flake. Four jobs fail the same way, and I don't think the Gym change causes it:

  • L1_Functional_Tests_Other_1 and gb200_L1_Functional_Tests_Other_1 fail in test_mcore_extra_installed_correctly.sh, and L1_Functional_Tests_AutoModel and gb200_L1_Functional_Tests_AutoModel fail in test_automodel_extra_installed_correctly.sh. Both scripts run uv run --reinstall --extra <extra> --no-build-isolation, which rebuilds nvidia-resiliency-ext from git, and the build fails with ModuleNotFoundError: No module named 'poetry_dynamic_versioning'.
  • The bot regenerates uv.lock with a newer uv than the container's (UV_VERSION=0.13.6): the lock goes from revision = 3 to revision = 5, and nvidia-resiliency-ext gains a [package.metadata] block. The dependency graph is unchanged: the same three packages depend on nvidia-resiliency-ext in both locks. The last bump that merged (build(gym): bump the Gym submodule #5195) kept revision = 3, and the earlier bot bumps (ci: Bump Gym to 591731a #5363, ci: Bump Gym to bfd253b #5401) never reached L1.
  • gb200_L1_Functional_Tests_Megatron_Generation finished both training steps and then failed in the metric checks, right after a uv run without --no-sync reinstalled one package. The log doesn't show the error.

My guess is that the revision-5 lock makes the container's uv miss its cached nvidia-resiliency-ext build, but I haven't confirmed it. If that's right, every bot bump hits this. Regenerating the lock with uv 0.13.6, or pinning the bot's uv to the container's, should fix it. Could you or whoever owns the bump bot take a look? I can move the two test fixes to the next bot PR.

@kajalj22

Copy link
Copy Markdown
Contributor

@marcromeyn I am taking a look at the uv issue here

…on runs don't call its build backend

uv 0.13.6 records requires-dist for the git-sourced nvidia-resiliency-ext in uv.lock.
'uv run --reinstall --no-build-isolation' then asks its build backend,
poetry-dynamic-versioning, for metadata, which the environment does not have, and the
mcore and automodel extra checks fail. Static dependency metadata, as for flash-attn
and causal-conv1d, answers that without the backend.

Signed-off-by: Marc Romeyn <[email protected]>
@marcromeyn

Copy link
Copy Markdown
Contributor

@terrykong @kajalj22 a correction to my comment from Tuesday, and a proposed fix for the L1_Functional_Tests_Other_1 and AutoModel failures (both the H100 and GB200 jobs).

My guess about the uv version was wrong. Regenerating uv.lock from main's lock with uv 0.13.6, the container's version, gives exactly the bot's lock, revision = 5 included. What changes is that uv 0.13.6 records a [package.metadata] requires-dist block for the git-sourced nvidia-resiliency-ext. Main's lock, written by an older uv, has none.

The failing step is uv run --reinstall --extra <extra> --no-build-isolation in test_mcore_extra_installed_correctly.sh and test_automodel_extra_installed_correctly.sh. On main, uv takes nvidia-resiliency-ext from its cache. With this lock, it calls the package's build backend for metadata (poetry_dynamic_versioning.backend.prepare_metadata_for_build_wheel). Under --no-build-isolation the backend has to be installed in the environment, and it isn't, so the call fails with No module named 'poetry_dynamic_versioning'.

Proposed fix: declare the package's metadata statically, as pyproject.toml already does for flash-attn, causal-conv1d and flash-mla, so uv never calls the backend for it:

[[tool.uv.dependency-metadata]]
name = "nvidia-resiliency-ext"
version = "0.7.0"
requires-dist = [...]  # the 20 requirements of the v0.7.0 tag, as the lock records them
provides-extras = ["attribution"]

I've pushed it as one commit on top of this branch, 61a45168af4bf23acf5970bd48c0e9f0aa213d23 (pyproject.toml plus 6 lines in uv.lock, relocked with uv 0.13.6; uv lock --check passes).

What I checked locally (uv 0.13.6, no poetry-dynamic-versioning installed): uv sync --locked --extra mcore --no-build-isolation --reinstall-package nvidia-resiliency-ext --dry-run fails with this error on the current lock, and on main's too, and passes with the fix. Not checked: the full CI jobs, which need the container. If a CI job ever has to build the wheel itself rather than take it from the cache, it would still need the backend; adding poetry-core and poetry-dynamic-versioning[backend] to the build group would cover that, as hatchling is there for nemo_run.

This doesn't explain gb200_L1_Functional_Tests_Megatron_Generation, whose log shows no error.

/ok to test follows. If you'd rather have the fix in its own PR against main, I can move it there.

@marcromeyn

Copy link
Copy Markdown
Contributor

/ok to test 61a4516

@github-actions

Copy link
Copy Markdown

✅ Submodule Fast-Forward Check Results

Check based on commit: 61a4516 (PR #5432 from ci/bump-gym-91666f9-20261124-120603)

✅ Submodules that are properly updated:

Gym: ✅ PR branch is ahead of main branch (fast-forward)

All submodule changes look good! ✨

@marcromeyn

Copy link
Copy Markdown
Contributor

/ok to test 577a24e

@github-actions

github-actions Bot commented Dec 1, 2026

Copy link
Copy Markdown

✅ Submodule Fast-Forward Check Results

Check based on commit: 577a24e (PR #5432 from ci/bump-gym-91666f9-20261124-120603)

✅ Submodules that are properly updated:

Gym: ✅ PR branch is ahead of main branch (fast-forward)

All submodule changes look good! ✨

@svcnvidia-nemo-ci svcnvidia-nemo-ci added complexity:high Large or cross-cutting change. Set by Autobot PR classify (skills/pr-classify) convergence-risk:high Likely to change training results. Set by Autobot PR classify (skills/pr-classify) proof:functionality Needs proof that it works. Set by Autobot PR classify (skills/pr-classify) proof:convergence Needs convergence proof (W&B runs). Set by Autobot PR classify (skills/pr-classify) proof:perf Needs performance proof. Set by Autobot PR classify (skills/pr-classify) labels Dec 1, 2026
@marcromeyn

Copy link
Copy Markdown
Contributor

@kajalj22 the container builds at 577a24e5 fail, both H100 and GB200, two attempts each. All four fail at the same step: the worker-venv prefetch, phase 2 (uv sync --inexact from prefetch_venvs.py). uv re-resolves there and can't read one wheel:

cause: Because flashinfer-jit-cache==0.7.2.post1+cu130 has an invalid package format ...
hint: The structure of `flashinfer-jit-cache` (v0.7.2.post1+cu130) was invalid:
  Failed to read from zip file

The wheel itself is fine. The x86_64 asset on the v0.7.2.post1 release is a 4,522-byte meta-package, a valid zip, and its sha256 (5a0a92ce…) matches uv.lock. Resolving flashinfer-jit-cache==0.7.2.post1 with uv 0.13.6 and an empty cache works. My guess is a bad copy of that wheel in the builders' persistent uv cache mount (uv-cache-${TARGETARCH}-${BASE_IMAGE}-${UV_VERSION}-...). Could you clear it, or tell me how to?

Main's builds don't hit this because main's sync at that step doesn't resolve (27 ms in today's build). This branch's sync does: it took about 1 s per venv on Nov 27 and passed then. uv lock --check with uv 0.13.6 passes on this branch, so I don't know yet why the in-image sync re-resolves. One thing that stands out: this lock's manifest lists fewer constraint dependencies than main's. If phase 2 is meant to run from the lock as-is, --locked there would make this fail loudly instead of re-resolving.

@marcromeyn

Copy link
Copy Markdown
Contributor

/ok to test 8797d4e

@github-actions

github-actions Bot commented Dec 2, 2026

Copy link
Copy Markdown

✅ Submodule Fast-Forward Check Results

Check based on commit: 8797d4e (PR #5432 from ci/bump-gym-91666f9-20261124-120603)

✅ Submodules that are properly updated:

Gym: ✅ PR branch is ahead of main branch (fast-forward)

All submodule changes look good! ✨

@terrykong terrykong left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Gym bump itself looks sound: all 139 nemo_gym names NeMo-RL imports still resolve with compatible signatures, and no package versions change in the lock. Both GB200 L1 failures are runner disk errors during docker pull ("structure needs cleaning"), so a rerun should clear them.

Asks, all for this PR:

  1. (C1) Move #5484's checkpoint schema guard (2 → 3), with its test and docs, into this PR.
  2. (C2) Bump the two uv 0.11.28 pins to 0.13.6 so they can read the new lock format.
  3. (C3) Delete the dead drain3 and logsage metadata overrides; this also fixes the misplaced drain3 comment.
  4. (C4) Add a test that a Messages call works through NeMo-RL's capture path.

nemo-rl-review: kind=expert harness=claude-code/2.1.334 model=claude-opus-5-5 effort=medium review-pr-team=v3 reviewed=8797d4e

Comment thread 3rdparty/Gym-workspace/Gym Resolved
Comment thread uv.lock Resolved
Comment thread pyproject.toml Resolved
…lineage

Gym 91666f9 scopes the parent search of captured calls by agent instance and
model server. Rows saved by the older Gym have no model server, so resuming
such a snapshot would treat already generated tokens as prompt. Bump
GYM_CHECKPOINT_SCHEMA_VERSION to 3 so these snapshots are refused, and say how
to continue (restore_mode=trainer_checkpoint, or a new checkpoint_dir).

Also update the comments and docs that said Gym's head server serves the
global config unredacted; Gym 91666f9 masks credential strings there.

Moved from #5484 (review C1).

Signed-off-by: Terry Kong <[email protected]>
uv.lock is now written by uv 0.13 (lock revision 5). uv 0.11.28 treats it as
out of date, so Dockerfile.ngc_pytorch's `uv sync --locked` fails and the lint
job re-resolves the lock. Pin the ngc image to 0.13.6 and have the lint job
read UV_VERSION from docker/Dockerfile, as the build job already does.

Review C2.

Signed-off-by: Terry Kong <[email protected]>
Neither logsage nor drain3 is a package in uv.lock, and nvidia-resiliency-ext
0.7.0 no longer depends on logsage, so both dependency-metadata blocks were
dead. Removing them also removes the drain3 comment that the new
nvidia-resiliency-ext block had ended up under. `uv lock --check` (uv 0.13.6)
still passes.

Review C3.

Signed-off-by: Terry Kong <[email protected]>
…_input

Gym 91666f9 admits Messages-harness calls into source-history capture, so the
refusal case was removed. Add the positive case: a two-turn /v1/messages call
continues its first turn and NeMo-RL keeps it token_in.

Review C4.

Signed-off-by: Terry Kong <[email protected]>
@terrykong

Copy link
Copy Markdown
Collaborator

/ok to test edab3c2

@marcromeyn marcromeyn left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving at edab3c2, alongside Terry's approval, to cover his commits on this branch.

@yuki-97 yuki-97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

super run had some issue. but merge it first and will fix it later since this issue should already existed in last bump and main branch.

@yuki-97
yuki-97 merged commit 8ed4acb into main Dec 4, 2026
124 of 133 checks passed
@yuki-97
yuki-97 deleted the ci/bump-gym-91666f9-20261124-120603 branch December 4, 2026 01:30
@terrykong terrykong mentioned this pull request Dec 4, 2026
5 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CI:L1 Run doctests, unit tests, and functional tests complexity:high Large or cross-cutting change. Set by Autobot PR classify (skills/pr-classify) convergence-risk:high Likely to change training results. Set by Autobot PR classify (skills/pr-classify) proof:convergence Needs convergence proof (W&B runs). Set by Autobot PR classify (skills/pr-classify) proof:functionality Needs proof that it works. Set by Autobot PR classify (skills/pr-classify) proof:perf Needs performance proof. Set by Autobot PR classify (skills/pr-classify)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants