-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add plus notation to wheel filenames at data.pyg.org/whl #66
Comments
I agree. We should add this in ASAP to match PyTorch behavior. One downside though is that we can only resolve CUDA versions with this, not PyTorch versions. |
Yep, I guess you would have to add There is also https://github.com/chriskuehl/dumb-pypi which would still allow hosting static files, but with
analogous to Say you don't encode pytorch version in the plus notation, it would be cool to investigate whether index urls can help overcome that problem (find-links wouldn't): $ pip install torch-sparse --extra-index-url https://data.pyg.org/whl/torch-1.9.0+cu111
...
$ pip install torch-sparse --extra-index-url https://data.pyg.org/whl/torch-1.10.0+cu111
hope that pip triggers a re-install despite identical wheel filename due to different index url |
On second thought, I think the You can then simply export PIP_EXTRA_INDEX_URL=https://download.pytorch.org/whl/cpu
export PIP_FIND_LINKS=https://data.pyg.org/whl/torch-1.9.0+cpu.html
pip install torch==1.9.0 torch-sparse ... |
@rusty1s if the last comment looks good to you, and you can point me to the relevant code, I'm happy to PR next week! |
This would be awesome. I think the fix is rather trivial as all we need to do is customize the name when building nightly wheels - see here. We already do this to inject the current date into the wheel name. |
Sounds good, not sure where stable wheels are pushed to s3, so I would then leave it to you to do it if that's ok 👍 |
Sounds good. Thank you! |
hi @rusty1s 👋 is there any chance your team could reserve some resources for this fix? cc @amogkam from ray-project/ray#26072 |
Hi @ddelange, I thought you wanted to start this, sorry for the misunderstanding. Do you need this for |
No worries! I think relevant packages (from PR linked above) are torch-scatter, torch-sparse, torch-cluster, torch-spline-conv |
Sorry if I communicated badly before. It's just that I wouldn't know where to make changes affecting the URLs (filenames) of the production wheels. Concerning the scope of this issue: I think all wheels that are cuda/torch specific are affected, so all projects except |
Hi @rusty1s 👋 Any update on an ETA? I tried again to find the code where production wheels get their filenames (built for different torch versions), but could only find the nightly setup you linked to before, which are not the wheels with the stable release I would be happy to push a fix for this (more or less trivial) issue, I just don't know where 😅 |
We will include this as part of our first |
Thanks for the reply, I opened four identical PRs to change filename (so not internal Like discussed above, it encodes e.g. If anything else, please ping! As for me, with these PRs in place and new patch releases out, this issue can be closed 💪 |
Ah just re-read, in that case you may want to keep this issue open for upcoming |
Thanks! I will try to merge tomorrow. |
hi @rusty1s 👋 any chance these PRs could get a merge & release to unblock downstream? |
Yes, I am currently building for PyTorch 1.13 but have a few problems with conda builds. This should be integrated once done. |
Hey @ddelange. I am onto it. As far as I understand, renaming the wheels is sufficient, is that correct? Does the URL needs to be changed as well or just the name in the |
the link that's passed to for the actual content on that page, it looks to me like only the to be sure (as well as to avoid human confusion), it probably makes sense that the href attribute corresponds to the display text of the link. |
I uploaded and renamed all wheels to https://data.pyg.org/wheels, see, e.g., https://data.pyg.org/wheels/torch-1.13.0/cpu/. However, it does not seem to work yet :(
|
Just removing |
Mh, it still downloads the package from https://pypi.org/simple rather than https://data.pyg.org/wheels/torch-1.13.0/cpu
|
i currently see |
with both torch and cuda versions encoded in the filenames, when switching extra index url, pip will read new filenames due to thay switch, and trigger a re-install. so both torch and cuda are needed in the filename so that it works as expected when bumping either/or/both. |
Yeah, I just changed it for a single wheel, see https://data.pyg.org/wheels/torch-1.13.0/cpu/torch_spline_conv/ ( |
does it work when you if yes, there might be some magic concerning how index urls work, missing metadata on the html or something (vs the find-links mechanic which just searches for |
This is a good point. It fails due to inconsistent metadata :(
Guess I have to re-build everything :( :( |
Yeah, I will try to update the wheels for PyTorch 1.13. |
I just pushed this change for |
that looks perfect! this will allow to do the same as is possible with torch / torchaudio etc 💪 could you do the same for |
All done. I guess we can finally close this issue. Thanks for your patience! |
Thanks for your persistence! 💥 |
@rusty1s @ddelange Thank you for looking into this. It's certainly an improvement over the previous situation! 🙇 I believe to have found an edge case which resurfaces the original comment of "currently, the filenames are identical (just a different URL path), which confuses pip into thinking there is no need for a re-install" The torch version in the + metadata is specified up to the minor version and therefore filenames can be identical between torch versions. In https://data.pyg.org/whl/torch-1.13.1%2Bcu116.html (for 1.13.1) This then resurfaces all the mentioned 'problems' with pip not reinstalling when it clearly should when the torch version (or cuda) version is updated. Could we fix that by setting the torch version to the patch version? |
Thanks for reporting. There is no need to re-install for patch versions. Am I missing something? |
🐛 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):
--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
The text was updated successfully, but these errors were encountered: