Repository navigation
[UV] Fix CPU-only PyTorch in Windows wheel installations - #8429
Conversation
There was a problem hiding this comment.
Isaac Lab Review Bot
Needs attention: Implementation (1), Style consistency (1). Other reviewed categories look good.
- PR description: The body claims demo commands use versioned overrides, but the URL follows the documentation branch rather than the wheel source tag; correct the implementation or narrow that claim and validation.
- Design and architecture: Architecture looks good.
- Scope and over-engineering: No over-engineering issues.
- API: API changes look good.
- Compatibility and deprecation: No breaking changes identified.
- Implementation: The demo overrides meta tag uses
_branch()instead ofisaaclab_wheel_source_tag, so published-wheel commands can consume incompatible pins; derive the URL from the wheel source tag. - Style consistency: The generator now requires sibling
uv.lock, but its module docstring still presents the root pyproject as the sole source; document both inputs and the lock-regeneration requirement. - Test quality: Test quality looks good.
Minor fixes needed. Posted 2 inline findings.
Automated review; human maintainers own approval decisions.
| ) -> None: | ||
| """Expose the versioned wheel resolver overrides to the demo command builder.""" | ||
| overrides_url = ( | ||
| f"https://raw.githubusercontent.com/isaac-sim/IsaacLab/{_branch(app.config)}/tools/wheel_builder/uv-overrides.txt" |
There was a problem hiding this comment.
🟡 Warning · Implementation — Overrides meta uses branch not wheel tag
Both wheel-install directives build this same URL from isaaclab_wheel_source_tag, while this handler uses _branch(). Demo commands install the published wheel but would apply the docs branch's overrides, which can pin incompatible versions. Use the wheel…
|
|
||
| # Index settings are not part of wheel metadata. Use the locked CUDA wheel URLs so | ||
| # uvx and pip cannot silently resolve CPU builds from PyPI (especially on Windows). | ||
| with Path(root_pyproject_path).with_name("uv.lock").open("rb") as f: |
There was a problem hiding this comment.
🟡 Warning · Style Consistency — Module docstring omits new lockfile input
The script now also reads the sibling uv.lock and fails without it, but the module docstring still says output is generated from the root pyproject alone. Document both inputs and the lock-regeneration requirement.
|
| overrides_url = ( | ||
| f"https://raw.githubusercontent.com/isaac-sim/IsaacLab/{_branch(app.config)}/tools/wheel_builder/uv-overrides.txt" | ||
| ) |
There was a problem hiding this comment.
The demo commands install a published isaaclab wheel but take overrides from the documentation branch. These already differ: the configured wheel tag uses newton[sim]==1.5.2 and MuJoCo 3.11, while the checkout overrides select a Git revision of Newton and MuJoCo 3.14. Copied commands therefore do not reproduce the documented wheel environment.
Use isaaclab_wheel_source_tag for the overrides and pin --from to isaaclab_wheel_version, so the wheel and its dependencies stay together.
| import isaaclab_rl | ||
| import isaaclab_tasks | ||
|
|
||
| assert torch.version.cuda == '13.0' |
There was a problem hiding this comment.
The new CUDA assertion does not test installation through the new wheel URLs. installed_wheel passes overrides for both base and isaacsim. Those overrides replace the torch and torchvision URLs with version requirements, so the added CUDA index can make the assertion pass even if installation through the generated URLs is broken.
Add a base-wheel install check without the PyTorch overrides or CUDA index. The separate metadata test checks the requirements, but does not install them.
|
run-ci |
|
Backported to |
# Description Windows `uvx --from ...#subdirectory=tools/wheel_builder` installations can select CPU-only PyTorch because wheel metadata does not carry the source checkout's CUDA index selection. This causes simulation startup to fail with `Torch not compiled with CUDA enabled` even with a working NVIDIA driver. Generate platform-marked, hash-pinned CUDA wheel requirements from `uv.lock` for torch and torchvision. This preserves CUDA selection for Windows and the supported Linux platforms without additional installer flags. Match the wheel's Python requirement to the source checkout and document the resulting installation behavior. Add a regression test at the generated package metadata boundary and a changelog entry. ## Type of change - Bug fix - Documentation update ## Release backport - [x] <!-- backport-active-release --> Backport this pull request to the active release branch after it merges into `develop` ## Validation - Wheel metadata tests: 10 passed under Python 3.12. The new CUDA regression fails against the pre-fix code for the intended CPU-resolution reason. - PEP 517 metadata generation verified six platform-marked CUDA requirements and Python version bounds. - Repository-wide formatting and lint hooks passed through the source CLI in an isolated uv environment; `git diff --check` passed. - Windows GPU execution was not run locally. ## Checklist - [x] I have read and understood the contribution guidelines - [x] I have run the pre-commit checks through the source CLI - [x] I have made corresponding changes to the documentation - [x] My changes generate no new warnings - [x] I have validated the changed behavior with focused coverage and applied the test-audit criteria - [x] I have added a changelog fragment for every touched package - [x] My name already exists in CONTRIBUTORS.md (cherry picked from commit 8a7a974)
Description
Windows
uvx --from ...#subdirectory=tools/wheel_builderinstallations can select CPU-only PyTorch because wheel metadata does not carry the source checkout's CUDA index selection. This causes simulation startup to fail withTorch not compiled with CUDA enabledeven with a working NVIDIA driver.Generate platform-marked, hash-pinned CUDA wheel requirements from
uv.lockfor torch and torchvision. This preserves CUDA selection for Windows and the supported Linux platforms without additional installer flags. Match the wheel's Python requirement to the source checkout and document the resulting installation behavior.Add a regression test at the generated package metadata boundary and a changelog entry.
Type of change
Release backport
developValidation
git diff --checkpassed.Checklist