Skip to content

Invalid version identifier in filenames of nightly builds #7697

@fellhorn

Description

@fellhorn

🐛 Bug

pip 24.1 deprecated legacy version identifiers and no longer allows installing the current nightly wheels directly. Other python package managers, like e.g. uv never supported these identifiers and always required renaming the wheel.

Additionally the version identifier in the wheel is different than the one in the filename.

To Reproduce

Steps to reproduce the behavior:

uv

> uv pip install torch_xla@https://storage.googleapis.com/pytorch-xla-releases/wheels/cuda/12.1/torch_xla-nightly-cp311-cp311-linux_x86_64.whl
error: The wheel filename "torch_xla-nightly-cp311-cp311-linux_x86_64.whl" has an invalid version part: expected version to start with a number, but no leading ASCII digits were found

pip

Broken:

> pip install pip==24.1.2
...
> pip install https://storage.googleapis.com/pytorch-xla-releases/wheels/cuda/12.1/torch_xla-nightly-cp311-cp311-linux_x86_64.whl
ERROR: Invalid requirement: 'torch-xla==nightly': Expected end or semicolon (after name and no valid version specifier)
    torch-xla==nightly
             ^

For others potentially finding this issue and need a workaround:

🟢 Works with torch_xla@ format

> pip install pip==24.1.2
...
> pip install torch_xla@https://storage.googleapis.com/pytorch-xla-releases/wheels/cuda/12.1/torch_xla-nightly-cp311-cp311-linux_x86_64.whl
...
Installing collected packages: torch_xla
Successfully installed torch_xla-2.5.0+git41d998d

🟢 Works with older pip versions

> pip install "pip<24"
...
> pip install https://storage.googleapis.com/pytorch-xla-releases/wheels/cuda/12.1/torch_xla-nightly-cp311-cp311-linux_x86_64.whl
...
Installing collected packages: torch_xla
Successfully installed torch_xla-2.5.0+git41d998d

Expected behavior

I would expect the version identifier in the filename to match the one in the wheel and be a valid identifier. This should allow installation with uv and modern pip versions.

Potential solutions

Ideas:

  • Use last release + day identifier like torch_xla-2.5.0+nightly20240716-cp311-cp311-linux_x86_64.whl
  • Keep current git hash versions, e.g. torch_xla-2.5.0+git41d998d-cp311-cp311-linux_x86_64.whl with a static URL redirecting to it

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions