Skip to content

Add plus notation to wheel filenames at data.pyg.org/whl #66

@ddelange

Description

@ddelange

🐛 Describe the bug

it would be cool to introduce the plus notation in the wheel filenames, to avoid having to pass --force-reinstall

currently, the filenames are identical (just a different URL path), which confuses pip into thinking there is no need for a re-install:

https://data.pyg.org/whl/torch-1.9.0+cu111/torch_sparse-0.6.12-cp36-cp36m-linux_x86_64.whl
https://data.pyg.org/whl/torch-1.9.0+cpu/torch_sparse-0.6.12-cp36-cp36m-linux_x86_64.whl
# vs
https://download.pytorch.org/whl/cu111/torch-1.9.0+cu111-cp36-cp36m-linux_x86_64.whl
https://download.pytorch.org/whl/cpu/torch-1.9.0+cpu-cp36-cp36m-linux_x86_64.whl

use-case: docker image (and other CI pipelines) building on top of env that already contains the cpu versions

ref ray-project/ray#26072 (comment)

current behaviour (whereas torch would be overwritten at the second command due to plus notation in the wheel filenames):

$ pip install --no-deps torch-sparse==0.6.12 --find-links https://data.pyg.org/whl/torch-1.9.0+cpu.html
Looking in links: https://data.pyg.org/whl/torch-1.9.0+cpu.html
Collecting torch-sparse==0.6.12
  Using cached https://data.pyg.org/whl/torch-1.9.0%2Bcpu/torch_sparse-0.6.12-cp38-cp38-linux_x86_64.whl (640 kB)
Installing collected packages: torch-sparse
Successfully installed torch-sparse-0.6.12
$ pip install --no-deps torch-sparse==0.6.12 --find-links https://data.pyg.org/whl/torch-1.9.0+cu111.html
Looking in links: https://data.pyg.org/whl/torch-1.9.0+cu111.html
Requirement already satisfied: torch-sparse==0.6.12 in /usr/local/lib/python3.8/dist-packages (0.6.12)
$ pip install --no-deps --force-reinstall torch-sparse==0.6.12 --find-links https://data.pyg.org/whl/torch-1.9.0+cu111.html
Looking in links: https://data.pyg.org/whl/torch-1.9.0+cu111.html
Collecting torch-sparse==0.6.12
  Downloading https://data.pyg.org/whl/torch-1.9.0%2Bcu111/torch_sparse-0.6.12-cp38-cp38-linux_x86_64.whl (3.7 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.7/3.7 MB 4.0 MB/s eta 0:00:00
Installing collected packages: torch-sparse
  Attempting uninstall: torch-sparse
    Found existing installation: torch-sparse 0.6.12
    Uninstalling torch-sparse-0.6.12:
      Successfully uninstalled torch-sparse-0.6.12
Successfully installed torch-sparse-0.6.12

--no-deps only added for demo purposes (shorter logs)

plus notation is a non-breaking change from pip's side (current install commands will still work identically), it will just allow pip to differentiate the use-case above.

Environment

N/A

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions