Skip to content

fix(orchestration): the driver install asks uv only for extras the checkout declares - #5626

Merged
AdamRajfer merged 2 commits into
mainfrom
arajfer/driver-install-declared-extras
Nov 5, 2026
Merged

AdamRajfer merged 2 commits into
mainfrom
arajfer/driver-install-declared-extras

Conversation

@AdamRajfer

@AdamRajfer AdamRajfer commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Older checkouts that do not declare the ray and mlflow extras fail at driver install, because uv sync errors on an undefined extra. The install now asks only for the extras the checkout declares, and prints one notice per extra it drops.

  • The driver install always requests the ray extra, and the mlflow extra when an exporter or GitLab dataset storage needs it. It used to run uv pip install -e ".[...]", where an undefined extra only warns (the docstring of render_driver_entrypoint still said so). With uv sync --locked --extra ... it is an error, so an older checkout from before those became extras (both were core dependencies there) stops with Extra 'ray' is not defined (or mlflow), although everything it needs is installed without them.
  • Each requested extra is now kept only when the checkout's pyproject.toml declares it. For each extra it drops, the install prints gym: the checkout defines no '<name>' extra, installing without it.
  • 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.
  • A checkout that declares every requested extra installs exactly as before.

Validation

  • uv run pytest tests/unit_tests/orchestration tests/unit_tests/cli: 3774 passed, 1 skipped (the resubmit tests need the mlflow and wandb extras installed).
  • The new test_the_driver_install_asks_uv_only_for_the_extras_the_checkout_declares in tests/unit_tests/orchestration/test_slurm_script.py (a checkout that declares every requested extra, and one that declares neither mlflow nor ray) fails without the source change (2 failed) and passes with it.
  • The assertions that spelled the literal 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 a python and a pyproject.toml in their stubbed clone.
  • uv sync --locked --dry-run on 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.
  • End to end, with this branch as the launcher: an evaluation run on an older checkout that declares neither extra printed gym: the checkout defines no 'mlflow' extra, installing without it and the same line for ray, installed, and completed (8 of 8 rows). The same install on the same evaluation without this change stopped at Extra 'ray' is not defined.
  • pre-commit run --files on 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

  • I have read the contributing guidelines.
  • The change is focused; unrelated "drive-by" edits are tracked as separate issues/PRs.
  • Tests added or updated and pass locally, or N/A for docs-only / non-code changes (so CI unit/server checks pass when applicable).
  • Documentation added or updated, or N/A with justification: the docstring of render_driver_entrypoint now describes the behavior.
  • Pre-commit checks pass locally (pre-commit run --all-files) (so CI lint/format checks pass): run on the changed files.
  • New source files include the required Apache-2.0 SPDX header: no new source files.
  • All commits have DCO sign-off (git commit -s) (so the DCO check passes).

🤖 Generated with Claude Code

…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]>
@AdamRajfer AdamRajfer self-assigned this Nov 4, 2026
@AdamRajfer

Copy link
Copy Markdown
Contributor Author

/ok to test 390f616

@svcnvidia-nemo-ci svcnvidia-nemo-ci 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.

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]>
@AdamRajfer

Copy link
Copy Markdown
Contributor Author

/ok to test d01c7f0

@AdamRajfer

Copy link
Copy Markdown
Contributor Author

Merged main with the lock files; CI is green on the required checks, ready for review.

@AdamRajfer
AdamRajfer added this pull request to the merge queue Nov 5, 2026
@github-actions

github-actions Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

🔄 Merge queue validation started! You can track the progress here: https://github.com/NVIDIA-NeMo/Gym/actions/runs/41938411107

Merged via the queue into main with commit c9b05a9 Nov 5, 2026
100 of 108 checks passed
@AdamRajfer
AdamRajfer deleted the arajfer/driver-install-declared-extras branch November 5, 2026 00:20
@linear-code linear-code Bot mentioned this pull request Nov 12, 2026
8 of 26 tasks

This branch was previously deployed

1 inactive deployment
public — d01c7f08 Deployed Nov 4, 2026 by copy-pr-bot[bot] via release / finalize / notify #10178
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants