Repository navigation
fix(orchestration): the driver install asks uv only for extras the checkout declares - #5626
Conversation
…eckout declares The driver install ran `uv sync --locked` with `--extra ray` always, and `--extra mlflow` for an exporter or for GitLab dataset storage. `uv sync` errors on an extra the project does not define, and an older checkout from before `ray` and `mlflow` became extras defines neither (both were core dependencies there). Installing such a checkout failed with `Extra 'ray' is not defined` (or `mlflow`), although everything it needs is installed without the extra. Each requested extra is now kept only when the checkout's pyproject.toml declares it, and the install prints one notice per extra it drops. The filter runs in the checkout's own venv after the clone, so it reads the checkout being installed, not the launcher. A checkout without a readable pyproject.toml still stops the install. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Signed-off-by: Adam Rajfer <[email protected]>
|
/ok to test 390f616 |
svcnvidia-nemo-ci
left a comment
There was a problem hiding this comment.
SHIP
LGTM — no concerns found.
I reviewed all five changed files and traced the generated install script through its Slurm, Kubernetes, telemetry/export, and remote-recovery callers. The filter preserves declared extras and keeps metadata-read failures within the existing install-failure handling.
Static review only; I didn't execute tests.
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.
Picks up the opencode_search lock files (#5629) that the lock check and dependency tests need. No conflicts; git merged every file on its own. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Adam Rajfer <[email protected]>
|
/ok to test d01c7f0 |
|
Merged main with the lock files; CI is green on the required checks, ready for review. |
|
🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/41938411107 |
What does this PR do?
Older checkouts that do not declare the
rayandmlflowextras fail at driver install, becauseuv syncerrors on an undefined extra. The install now asks only for the extras the checkout declares, and prints one notice per extra it drops.rayextra, and themlflowextra when an exporter or GitLab dataset storage needs it. It used to runuv pip install -e ".[...]", where an undefined extra only warns (the docstring ofrender_driver_entrypointstill said so). Withuv sync --locked --extra ...it is an error, so an older checkout from before those became extras (both were core dependencies there) stops withExtra 'ray' is not defined(ormlflow), although everything it needs is installed without them.pyproject.tomldeclares it. For each extra it drops, the install printsgym: the checkout defines no '<name>' extra, installing without it.pyproject.tomlstill stops the install.Validation
uv run pytest tests/unit_tests/orchestration tests/unit_tests/cli: 3774 passed, 1 skipped (the resubmit tests need themlflowandwandbextras installed).test_the_driver_install_asks_uv_only_for_the_extras_the_checkout_declaresintests/unit_tests/orchestration/test_slurm_script.py(a checkout that declares every requested extra, and one that declares neithermlflownorray) fails without the source change (2 failed) and passes with it.uv sync --locked --extra ...line (test_orchestration_otel.py,test_orchestration_exports.py,test_remote_managed_recovery.py) now read the extras the install requests. The private-uv entrypoint tests get apythonand apyproject.tomlin their stubbed clone.uv sync --locked --dry-runon two real checkouts: one that declares neither extra errors with the old request (Extra 'mlflow' is not defined) and resolves with the filtered one; one that declares both keeps all three extras.gym: the checkout defines no 'mlflow' extra, installing without itand the same line forray, installed, and completed (8 of 8 rows). The same install on the same evaluation without this change stopped atExtra 'ray' is not defined.pre-commit run --fileson the changed files (ruff 0.9.9, ruff format, guardwords, import-linter): pass.Rollouts
N/A: only the install step of the generated driver script changes; no environment or agent code.
Compatibility and benchmark impact
None for a checkout that declares every requested extra. An older checkout that declares neither now installs instead of failing at the install; the installed packages and the results do not change.
Checklist
render_driver_entrypointnow describes the behavior.pre-commit run --all-files) (so CI lint/format checks pass): run on the changed files.git commit -s) (so the DCO check passes).🤖 Generated with Claude Code