Skip to content

PyTorch nightly inconsistency between uv pip install vs uv sync (missing nvidia packages) #10693

Open
@tmm1

Description

@tmm1

in #2541 (comment), uv pip install was fixed for torch-nightly:

$ uv venv
$ uv pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu126
Resolved 27 packages in 637ms
Prepared 9 packages in 23.32s
Installed 27 packages in 42.07s
 + filelock==3.16.1
 + fsspec==2024.10.0
 + jinja2==3.1.4
 + markupsafe==2.1.5
 + mpmath==1.3.0
 + networkx==3.4.2
 + numpy==2.1.2
 + nvidia-cublas-cu12==12.6.4.1
 + nvidia-cuda-cupti-cu12==12.6.80
 + nvidia-cuda-nvrtc-cu12==12.6.77
 + nvidia-cuda-runtime-cu12==12.6.77
 + nvidia-cudnn-cu12==9.5.1.17
 + nvidia-cufft-cu12==11.3.0.4
 + nvidia-curand-cu12==10.3.7.77
 + nvidia-cusolver-cu12==11.7.1.2
 + nvidia-cusparse-cu12==12.5.4.2
 + nvidia-cusparselt-cu12==0.6.3
 + nvidia-nccl-cu12==2.21.5
 + nvidia-nvjitlink-cu12==12.6.85
 + nvidia-nvtx-cu12==12.6.77
 + pillow==11.0.0
 + pytorch-triton==3.2.0+git0d4682f0
 + sympy==1.13.1
 + torch==2.7.0.dev20250116+cu126
 + torchaudio==2.6.0.dev20250116+cu126
 + torchvision==0.22.0.dev20250116+cu126
 + typing-extensions==4.12.2

and in #9651 (comment), uv sync was fixed for torch-nightly:

[project]
name = "torchnightly"
requires-python = ">=3.11.9"
dependencies = [
    "torch",
    "torchao",
    "torchaudio",
    "torchvision",
]
dynamic = ["version"]

[tool.uv.sources]
torch = [{ index = "pytorch-nightly-cu126" }]
torchvision = [{ index = "pytorch-nightly-cu126" }]
torchaudio = [{ index = "pytorch-nightly-cu126" }]
torchao = [{ index = "pytorch-nightly-cu126" }]

[[tool.uv.index]]
name = "pytorch-nightly-cu126"
url = "https://download.pytorch.org/whl/nightly/cu126"
explicit = true
$ uv sync
Using CPython 3.11.9
Creating virtual environment at: .venv
⠋ Resolving dependencies...
warning: Missing version constraint (e.g., a lower bound) for `torch`
warning: Missing version constraint (e.g., a lower bound) for `torchao`
warning: Missing version constraint (e.g., a lower bound) for `torchaudio`
warning: Missing version constraint (e.g., a lower bound) for `torchvision`
Resolved 19 packages in 8.01s
Prepared 3 packages in 1m 03s
Installed 14 packages in 38.06s
 + filelock==3.16.1
 + fsspec==2024.12.0
 + jinja2==3.1.5
 + markupsafe==3.0.2
 + mpmath==1.3.0
 + networkx==3.4.2
 + numpy==2.2.1
 + pillow==11.1.0
 + sympy==1.13.1
 + torch==2.7.0.dev20250116+cu126
 + torchao==0.8.0.dev20250116+cu126
 + torchaudio==2.6.0.dev20250116+cu126
 + torchvision==0.22.0.dev20250116+cu126
 + typing-extensions==4.12.2

however, notice how both produce different results

-Installed 27 packages in 42.07s
+Installed 14 packages in 38.06s

in the uv sync/pyproject.toml version, the nvidia packages are missing causing runtime failures.

cc @charliermarsh #10119 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    lockRelated to universal resolution and locking

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions