Repository navigation
refactor(environment): move the registries into nemo_gym/environment - #5298
Merged
Merged
Conversation
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
ananthsub
marked this pull request as ready for review
October 29, 2026 13:17
35 of 41 tasks
Contributor
svcnvidia-nemo-ci
left a comment
Contributor
There was a problem hiding this comment.
SHIP WITH CARE — one RISK: a GDPVal test rejects the valid public-package import introduced here.
Reviewed all changed files and directly affected compatibility, discovery, CLI, and deliverable paths. The registry/discovery topic was checked directly because its delegated report was unavailable. No runtime regression was identified in the relocation.
Static inspection only; tests and documentation generation were not executed.
Review generated by codex. This was a full review. Request a full review with /review reset=true.
ananthsub
force-pushed
the
ananthsub/layout-environment
branch
from
October 29, 2026 14:04
a741219 to
1dfee09
Compare
ananthsub
force-pushed
the
ananthsub/layout-environment
branch
from
October 29, 2026 14:19
1dfee09 to
0fccf3f
Compare
ananthsub
force-pushed
the
ananthsub/layout-environment
branch
from
October 29, 2026 16:27
8d54d2d to
949a57b
Compare
ananthsub
force-pushed
the
ananthsub/layout-environment
branch
from
October 29, 2026 16:45
949a57b to
fe1053d
Compare
ananthsub
force-pushed
the
ananthsub/layout-environment
branch
from
October 29, 2026 17:01
fe1053d to
c7fd30c
Compare
ananthsub
force-pushed
the
ananthsub/layout-environment
branch
from
October 29, 2026 18:25
c7fd30c to
e89ecfe
Compare
ananthsub
force-pushed
the
ananthsub/layout-environment
branch
from
October 29, 2026 19:04
e89ecfe to
2ce6b85
Compare
ananthsub
force-pushed
the
ananthsub/layout-environment
branch
from
October 29, 2026 19:32
2ce6b85 to
6a7d2a6
Compare
…into nemo_gym/environment Move benchmarks.py, deliverables.py, discovery.py, registry.py, resources_server_registry.py, agent_registry.py and model_registry.py into the existing nemo_gym/environment package, unchanged. They find the repository's component directories through nemo_gym.PARENT_DIR, which does not change. Record the moves in MOVED_MODULES, rewrite in-repo references with scripts/migrate_imports.py, make the contract's environment layer the nemo_gym.environment package, and redirect the old library reference pages in fern/docs.yml. The registry, benchmark, deliverable, discovery and environment tests move into tests/unit_tests/environment and find the repository root one level further up. Regenerate the public API of each layout package that exists here from what non-test code outside nemo_gym imports, and point code outside nemo_gym, tests included, at nemo_gym.<package>. Signed-off-by: Ananth Subramaniam <[email protected]>
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 and why
Moves the environment, benchmark, agent, model, and resources server registries, with discovery and deliverables, into the existing
nemo_gym/environment/package. They find the repository's component directories throughnemo_gym.PARENT_DIR, which does not change.Where this PR sits
The stack lands bottom-up; each PR's base is the branch of the PR before it, so each diff shows only that PR's change.
Where the package sits
An arrow means "imports"; each package imports only packages below it. Yellow: created by this PR. Green: created by an earlier PR in the stack. Grey: still to come.
What moves
Whole modules, unchanged:
nemo_gym/benchmarks.pynemo_gym/environment/benchmarks.pynemo_gym/deliverables.pynemo_gym/environment/deliverables.pynemo_gym/discovery.pynemo_gym/environment/discovery.pynemo_gym/registry.pynemo_gym/environment/registry.pynemo_gym/resources_server_registry.pynemo_gym/environment/resources_server_registry.pynemo_gym/agent_registry.pynemo_gym/environment/agent_registry.pynemo_gym/model_registry.pynemo_gym/environment/model_registry.pyHow to review
One commit. Its changes:
MOVED_MODULESinnemo_gym/_moved_paths.py.scripts/migrate_imports.py.environmentlayer becomes thenemo_gym.environmentpackage.fern/docs.ymlredirects the old library reference pages to the new ones.tests/unit_tests/environment/and find the repository root one level further up. GDPVal's test that both of its modules share one ignore list expects their import throughnemo_gym.environment.Public API
Every layout package that exists after this PR has a lazy public API in its
__init__.py: the names code outsidenemo_gym/imports from it (servers and their tests, benchmarks, scripts, and code samples in docs and skills), plus every name it already exported, each served from the submodule that defines it on first use. Code outsidenemo_gym/and its tests (servers and their tests, benchmarks, scripts, and docs) imports those names fromnemo_gym.<package>, so later moves inside a package leave it alone. Code insidenemo_gym/, and the library's tests undertests/, import from the module that defines each name, so the import-linter contract sees every dependency and a test reads what it patches. A patch target names the module the code under test looks the name up in.AGENTS.mdstates the rule.Validation
pytest -n 16 tests/unit_tests, also with-W errorfor the moved paths. The only failures are environment-specific and unrelated to the move: this machine's hostname resolves to127.0.1.1, which the sandbox host check refuses (the Harbor run summary tests and the benchmark listing test), and two Docker PTY tests.lint-imports.pre-commit runon the changed files.Rollout evidence: N/A. The modules move unchanged.
Compatibility
nemo_gym.environment.*. A logging config set onnemo_gymstill covers them.python scripts/migrate_imports.py <paths>.Issue
Part of #5166.