Repository navigation
feat(cli): include entry paths in gym list environments --json - #5392
Conversation
|
/ok to test cae6f31 |
svcnvidia-nemo-ci
left a comment
There was a problem hiding this comment.
SHIP
LGTM — no concerns found. Reviewed all three changed files and traced the catalog payload through registry discovery and list/search/benchmark routing. The fields are additive, missing manifests serialize as null, and table and named-inspection behavior remain unchanged. The tests and CLI reference match the change.
Static review only; tests were not executed.
Note: formal approval is not available for this request, so this review is posted as a comment only.
Review generated by codex. This was a full review. Request a full review with /review reset=true.
cae6f31 to
8379ebf
Compare
|
/ok to test 8379ebf |
8379ebf to
f649fd7
Compare
|
/ok to test f649fd7 |
yaoyu-33
left a comment
There was a problem hiding this comment.
Adds path, config_path and manifest_path (absolute, symlink-resolved; manifest_path is null without a manifest) to the catalog JSON, so tools can locate entries without re-implementing discovery.
At this head the real gym list environments --json returns 468 entries, every path exists, manifest_path is null for exactly the 256 no-manifest entries, and the output without the three new keys equals main's. TestListEnvironments passes. No blockers; one docs request is inline.
Process notes: the validation in the body ran on the combined #5446 stack rather than this head alone (the checks above hold at this head too). The red preview check fails parsing the generated judge_profile.mdx, which this PR does not touch (fixed on main by #5602, so a rerun after merging main should go green), and the red non-blocking harness-conformance jobs (kilocode, Publish check) also fail on unrelated PRs.
Overall: ship.
| | `--status experimental\|no-manifest` | Filter by the experimental annotation or missing manifest. | | ||
| | `--lifecycle active\|deprecated` | Filter by lifecycle. | | ||
| | `--json` | Output catalog entries as JSON. | | ||
| | `--json` | Output catalog entries as JSON, including each entry's absolute `path`, `config_path` and `manifest_path` (`null` without a manifest). | |
There was a problem hiding this comment.
Could you say what path is in this row? It is the entry's directory and is not unique: 96 of the 468 catalog entries share one of 29 path values, and for 76 config_vN variants config_path sits outside path (for example benchmarks/aalcr/config_v1_1.yaml next to benchmarks/aalcr/config_v1_1/). All three paths also have symlinks resolved, so a tool that matches path against its own search root can miss. A clause such as "config_path is the entry's config file; path is its directory and can be shared; paths are absolute with symlinks resolved" would keep tools from treating path as an id; gym list benchmarks --json and gym search --json emit the same keys, so a cross-reference there would help too.
There was a problem hiding this comment.
Thanks, Yu. Updated the CLI reference in 763a10b: path is the entry directory and can be shared; config_path identifies the config file and can be outside that directory; all non-null paths are absolute with symlinks resolved. I included the aalcr/config_v1_1 example and added cross-references from benchmark listing and search.
The PR body now records validation for #5392 separately from #5446. The docs preview passed after the previous rebase. I also rebased onto main's #5629 fix for the newly introduced component-lock failures; all 268 lock checks and 32 targeted dependency/catalog tests pass locally.
c103d1e to
3dd1833
Compare
|
/ok to test 3dd1833 |
Each catalog entry in the JSON output now carries its absolute path, config_path and manifest_path (null without a manifest), resolved like the agent inspect view. Entries without a manifest are found by several legacy rules, so a consumer of the JSON could not locate them from the name alone. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Yuhe Zhang <[email protected]>
Signed-off-by: Yuhe Zhang <[email protected]>
3dd1833 to
763a10b
Compare
|
/ok to test 763a10b |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/42304389021 |
What and why
gym list environments --jsonincludes each entry's absolute, resolvedpath,config_path, andmanifest_path(nullwithout a manifest). External tools can locate catalog entries without duplicating the discovery rules innemo_gym/environment/registry.py. The CLI reference explains thatpathis a directory that entries can share,config_pathcan sit outside that directory, and symlinks are resolved. Benchmark listing and search link to the same field definitions.Supports #3946 (informed environment selection); no separate issue is needed for this focused addition.
Compatibility
Three additive JSON keys; existing keys and the table output are unchanged. This is the parent of #5446, which adds server names to the same output.
Validation
Current head:
763a10b0d6bec41a0318a7952bd2fc531582857d, rebased ontomainatcc8991e4cf55a36ed6566713685d1ca76be05d3b. This includes #5629, which fixes the missingopencode_searchdependency files responsible for both component-lock failures and all five failed core dependency tests in the previous CI run. Both PR commits are unchanged by the rebase.pytest tests/unit_tests/tooling/test_component_dependencies.py tests/unit_tests/cli/test_cli.py::TestListEnvironments -q -o addopts='' -o log_cli=false: 32 passed.uv run --no-project --python 3.13.14 python scripts/component_locks.pywith uv 0.13.4: 268 projects checked, 0 failed.pre-commit run --all-files: passed.Earlier validation
Validated this PR alone at
c103d1e679a6890056752be0cc05a73f5f503cc0; the rebased head3dd1833f5abbe2abd94327c0cfcd885eae57a37ahas the identical file tree, based onmainat74b307063d116827bf42537d5d9f533f318e2a16. Python 3.13.14, uv 0.13.4, and locked development dependencies (uv sync --locked --extra dev).pytest tests/unit_tests/cli/test_cli.py \ tests/unit_tests/cli/test_cli_main.py \ tests/unit_tests/environment/test_registry.py \ -q -o addopts='' -o log_cli=falseTestRunHelperServerReadiness::test_memory_profiler_uses_spawned_server_metadata: memory profiling requires Linux procfs and is disabled on macOS. It also fails with main's unchanged test and the unchanged memory-profiler implementation. The catalog path tests pass.python tests/unit_tests/test_fern_docs_links.py: 29 passed.pre-commit run --all-files: passed.cd fern && npm run check -- --warnings: zero errors, one warning. Authenticated missing-redirect checking was skipped because no Fern login was available.gym list environments --json: 472 entries, with all non-null paths absolute, symlink-resolved, and existing;manifest_pathis null for exactly the 259 entries without a manifest. The output confirms 97 entries share 29 directories and 77 configs sit outside their entry directory, including the documentedaalcr/config_v1_1example.gym list benchmarks --json(253 entries) andgym search benchmarks aalcr --json(2 entries): all three path fields match the environment catalog. The commands emit an existing deprecation warning foropencode_sandboxed_search_agent; stdout remains valid JSON.Rollout evidence: N/A. CLI catalog output only; no environment, agent, or verifier execution changes.