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
Pytorch 2.0.1 pypi wheel does not install dependent cuda libraries #100974
Comments
Not sure about the poetry, but I can't reproduce it with pip:
|
@Martin4R can you share a bit more info about your setup? Also, please run
|
Hi @malfet,
I found a workaround for now, by manually listing the nvidia-* dependencies from torch 2.0.0 in my pyproject.toml together with torch 2.0.1, so that they always get installed. Our software is then working with GPU successfully again.
When I then run
|
@malfet edit: The json file for 2.0.0 contains all the dependecies https://pypi.org/pypi/torch/2.0.0/json |
@twoertwein thank you for the information. Trying to figure out when this file is generated by pypi and whether there is a way to update it without uploading a new binary. My suspicion is that it depends on the package upload order and we got lucky with 2.0.0 to upload Linux package last, which has all the deps... |
I encountered a related problem in the 2.0.0 release as well: pantsbuild/pants#18936 (comment) The gist of this link is:
Could the PyPI wheels all have the same declared dependencies? Linux x86 already has appropriate environment markers, so the CUDA/triton deps that are specific to it would simply be no-ops for other platforms. |
@malfet Should we try to address this issue using suggestion in this comment: python-poetry/poetry#7902 (comment)
|
Following... was having a related issue with Github Actions. Have not found anything w.r.t. Actions or any CI in particular on this yet. The short version was that, despite not running GPU/ absolutely nothing in these tests going to GPU/ to my understanding, not installing with CUDA/ GPU support, my
However, copy/pasting all the dependencies explicitly as suggested above fixed it (for now, at least). |
Thanks for looking at this issue. For now downgrading to 2.0.0 seems to work for me (poetry and pypi). Do you plan to fix the 2.0.1 installation or do we have to wait for the next iteration ? |
torch 2.0.1 has known issues with installation and caused our CI to fail (see pytorch/pytorch#100974). I think the simplest solution is to just disallow the specific version 2.0.1
I also saw this issue in a GitHub CI. It only occurred for Ubuntu actions, not for Mac OS, and downgrading to torch 2.0.0 resolved the issue for me. Specifically, I've specified |
I also solved it the same way as sammlapp. thank you. |
In case it helps anyone, if you are using arch, installing the
|
Will fix package after publishing pytorch#100974 Poetry install requires all wheels on pypi to have same metadata. Hence including linux dependencies in all non-linux wheels Pull Request resolved: pytorch#111042 Approved by: https://github.com/malfet
* Add pypi required metadata to all wheels except linux (#111042) Will fix package after publishing #100974 Poetry install requires all wheels on pypi to have same metadata. Hence including linux dependencies in all non-linux wheels Pull Request resolved: #111042 Approved by: https://github.com/malfet * Regenerate workflows
validation required, included in 2.1.1 |
Validated following packages: |
* Do not restrict torch = "<=2.0.0" * Restrict problematic pytorch versions pytorch/pytorch#100974 * Set poetry to 1.7.0 in tests * Add Python 3.11 to tests * Rollback installing poetry 1.7.0 * Set PYTORCH_MPS_HIGH_WATERMARK_RATIO to 0.7 in tests * Remove macos from workflow * Allow python 3.12 * Rollback to python 3.8-3.11 * Enable macos in tests back again * Add CPU version of torch in dev group * Fix using pytorch CPU version * Separate dev dependency to pytorch per platform * Disable tests on macos
Release 2.1.1 is out
|
https://download.pytorch.org/whl/cu121/torch-2.1.1%2Bcu121-cp310-cp310-linux_x86_64.whl unconditionally contains linux requirements, per python-poetry/poetry#8690 (comment) |
* Add pypi required metadata to all wheels except linux (pytorch#111042) Will fix package after publishing pytorch#100974 Poetry install requires all wheels on pypi to have same metadata. Hence including linux dependencies in all non-linux wheels Pull Request resolved: pytorch#111042 Approved by: https://github.com/malfet * Regenerate workflows
I have similar error with pip install torch==2.1.1:
|
@kventinel Could you try the default PyPI index? |
@vit-zikmund, thanks. It helped me. |
### Summary of Changes Bump `torch` & `torchvision` to the latest version to fix the issue described in pytorch/pytorch#100974.
I came across this after upgrading from sentence-transformers 2.2.2. A dependency had torch was in the range mentioned and it was removed. pytests failing. Adding torch explicitly solved this problem. |
🐛 Describe the bug
With torch 2.0.1 the torch pypi wheel does not depend on cuda libraries anymore. Therefore when starting torch on a GPU enabled machine, it complains
ValueError: libnvrtc.so.*[0-9].*[0-9] not found in the system path
(stacktrace see at the end below).When I show the dependency trees for torch=2.0.1 and torch=2.0.0 with poetry (installed on the same machine with same dependency file as before) it becomes clear that torch 2.0.1 is missing the nvidia dependencies:
Here the stacktrace of the error at runtime:
Versions
Version where the issue occurs is the pypi wheel of torch 2.0.1.
When trying to run python collect_env.py to collect the versions, two errors shows up:
cc @ezyang @gchanan @zou3519 @seemethere @malfet
The text was updated successfully, but these errors were encountered: