Repository navigation
feat(orchestration): record the installed Gym commit in the submission record - #3529
Merged
Merged
Conversation
iguehring-nvidia
force-pushed
the
iguehring/submission-record-gym-commit
branch
from
September 20, 2026 15:38
6096c35 to
f23842f
Compare
…n record `gym-job.json` carries `gym_version`, which repeats across every commit between two version bumps. A reader that must reinstall the exact Gym that wrote a record -- to recompose its config with `--resolve-only` and compare, as an external certifier does -- cannot pin it from that. Add `gym_commit`: the commit of the running nemo-gym, read from the distribution's PEP 610 direct_url.json for a git install, asked of the checkout for an editable install, None for an index wheel. Added with a default, so records written before it still load under schema version 1. Signed-off-by: Ingo Guehring <[email protected]>
iguehring-nvidia
force-pushed
the
iguehring/submission-record-gym-commit
branch
from
September 20, 2026 15:43
f23842f to
152b0f1
Compare
iguehring-nvidia
enabled auto-merge
September 21, 2026 07:36
marta-sd
reviewed
Sep 21, 2026
…mmit, marked when dirty A developer submitting from `pip install -e .` had `gym_commit: null`. Ask the checkout instead: its HEAD when clean, `<HEAD>-dirty` when it has uncommitted changes, so a clean checkout is reproducible and a dirty one is comparable without reading as a pin. git missing or the directory not being a repository still yield None, logged. Signed-off-by: Ingo Guehring <[email protected]>
… per install kind Signed-off-by: Ingo Guehring <[email protected]>
…eckout, not from install metadata
An editable install in a uv venv can lack distribution metadata for
nemo-gym, so `distribution("nemo-gym")` raised PackageNotFoundError and
the commit went unrecorded. Metadata is now consulted only for the
commit a git install records; otherwise the checkout the running
nemo_gym package is tracked in is asked directly, which covers editable
installs and plain source trees on sys.path alike. A package that no
checkout tracks (a wheel in site-packages, even inside a clone) still
yields None.
Signed-off-by: Ingo Guehring <[email protected]>
marta-sd
approved these changes
Sep 21, 2026
Contributor
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/35600633590 |
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Sep 21, 2026
Contributor
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/35604727122 |
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
Sep 21, 2026
7 tasks done
Contributor
Author
Contributor
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/35615079789 |
reinainblood
pushed a commit
to reinainblood/Gym
that referenced
this pull request
Sep 21, 2026
…NeMo#3564) ## What does this PR do? Unbreaks `main` after NVIDIA-NeMo#3535. Its 75 new `benchmarks/*/manifest.yaml` files each mirror their benchmark's `type: benchmark` dataset, so `_benchmark_config_paths`'s content-based prefilter (`_is_benchmark_config`) takes every manifest for a second config of the same benchmark. Manifests don't resolve as configs, so the listing drops them and `tests/unit_tests/test_benchmarks.py::TestDiscoverBenchmarksInDir::test_every_repo_benchmark_appears_in_listing` fails on `main`: ``` AssertionError: 218 benchmark config(s) discovered but only 143 appear in the listing ``` `NVIDIA-NeMo#3535`'s own merge-queue run passed because it was queued against the previous base; the first PR queued after it (NVIDIA-NeMo#3529) has been ejected twice with "failed status checks". Reproduced locally: fails on `main` (`9164de0e`), passes on its parent (`2581db97`). Fix: `_is_benchmark_config` rejects a `manifest.yaml` by name before looking at content, so the predicate states the whole definition of a benchmark config and every caller of the discovery inherits it. `nemo_gym/registry.py` already filtered the manifest out of the legacy benchmark listing for the same reason; that filter is now redundant and removed, and `MANIFEST_FILENAME` moves to `benchmarks.py` so both modules read one definition (registry imports benchmarks, not the other way round). ## Validation ``` python -m pytest tests/unit_tests/test_benchmarks.py tests/unit_tests/test_registry.py \ tests/unit_tests/test_environment_publication.py tests/unit_tests/test_environment_onboarding.py \ tests/unit_tests/test_environment_manifest.py # all pass, including test_every_repo_benchmark_appears_in_listing (218 == 218) pre-commit run --files nemo_gym/benchmarks.py nemo_gym/registry.py tests/unit_tests/test_benchmarks.py ``` New test `test_prefilter_rejects_the_benchmarks_manifest`: a `config.yaml` and a `manifest.yaml` declaring the same dataset → the prefilter rejects the manifest and only the config is discovered. ## Rollouts N/A — discovery only. ## Compatibility and benchmark impact None to configs or scoring. `gym list benchmarks` output is unchanged from before NVIDIA-NeMo#3535; the catalog (`registry.py`) reads manifests through its own path as before. ## Checklist - [x] I have read the [contributing guidelines](https://github.com/NVIDIA-NeMo/Gym/blob/main/CONTRIBUTING.md). - [x] The change is focused; unrelated "drive-by" edits are tracked as separate issues/PRs. - [x] Tests added or updated and pass locally, or N/A for docs-only / non-code changes (so CI unit/server checks pass when applicable). - [x] Documentation added or updated, or N/A with justification — docstring of `_benchmark_config_paths` explains the exclusion. - [x] Pre-commit checks pass locally (`pre-commit run --all-files`) (so CI lint/format checks pass). - [x] New source files include the required Apache-2.0 SPDX header — no new files. - [x] All commits have DCO sign-off (`git commit -s`) (so the DCO check passes). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: Ingo Guehring <[email protected]>
2 tasks done
This branch was previously 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?
gym-job.jsonrecordsgym_version, which repeats across every commit between two version bumps. A reader that needs to reinstall the exact Gym that wrote a record — to recompose the submission's config withgym eval submit --resolve-only(#3524) and compare it against what it expects — cannot pin that from the version alone.This adds
SubmissionRecord.gym_commit: the commit of the nemo-gym that wrote the record.pip install git+…@<sha>) records the commit in the distribution's PEP 610direct_url.jsonasvcs_info.commit_id; that is used when present.nemo_gympackage is tracked in is asked directly (git ls-files --error-unmatchon the package, thenrev-parse HEAD/status --porcelain): its HEAD when clean,<HEAD>-dirtywhen it has uncommitted changes. This does not depend on install metadata at all, so an editable install whose venv lacksnemo-gymdist-info (uv can produce that) and a plain source tree onsys.pathboth work.site-packages, even when the venv sits inside a clone — yieldsNone; so does a missinggit. EveryNoneis logged with its reason. An index wheel needs no commit anyway: a published version is immutable, sogym_versionalready identifies it.Added with a default, as
jobs.py's compatibility rule requires of a same-version change: records written before this still load underschema_version: 1.jobs.pystays executor-agnostic (no new imports fromexecutors/).Consumer: NVIDIA's eval-factory certification layer (Evergreen) pins the Gym it recomposes with from this field instead of from its own toolchain pin.
Validation
Against real installs: in a venv created with
pip install "nemo-gym @ git+https://github.com/NVIDIA-NeMo/gym.git@c41584d1…",direct_url.jsonreads{"vcs_info": {"commit_id": "c41584d1…"}}and the helper returns it; in this editable checkout with local edits it returns<HEAD>-dirty, and the same source tree onPYTHONPATHin a venv with nonemo-gymdist-info (wheredistribution("nemo-gym")raisesPackageNotFoundError) returns the same.End to end on a Slurm cluster:
pip install "nemo-gym @ git+…gym.git@4636cd35…"into a fresh venv,gym eval submita real config (job cancelled right after enqueue),gym-job.jsonreads"gym_commit": "4636cd35d33675551bfb6e3ba91295a1b03874fe".Install scenarios exercised for real against this branch's head (
29bf4f61), beyond the unit tests:direct_url.jsongym_commitpip install "nemo-gym @ git+…@29bf4f61"into a fresh venv on a Slurm login node, realgym eval submit(job cancelled at enqueue)vcs_info.commit_id29bf4f61…uv pip install -e <clean clone>dir_info.editable29bf4f61…dir_info.editable29bf4f61…-dirtyPYTHONPATH, no nemo-gym dist-info at all (distribution()raises)29bf4f61…29bf4f61…-dirty.venvinside the clonearchive_infoNone(not tracked in a checkout)PYTHONPATH,gitnot onPATHNone(git is not available)Rollouts
N/A — orchestration metadata only; no environment or agent code.
Compatibility and benchmark impact
Additive, defaulted field on
gym-job.json; no schema version bump needed and older records load unchanged. No benchmark-result effect.Checklist
SubmissionRecord's docstring, where the other fields are.pre-commit run --all-files) (so CI lint/format checks pass).git commit -s) (so the DCO check passes).🤖 Generated with Claude Code