-
Notifications
You must be signed in to change notification settings - Fork 7k
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
Failed to load image extension #7036
Comments
Is there a guideline for what the matching version of torchvision should be for a given torch commit? |
In general, the
and
I'm guessing this a bug in the collection and you actually installed Could you update that and see if the error persists? |
@pmeier Thanks, will try it out. How did you figure out the commit for torch from this information by the way?
does not contain the commit information for pytorch. And yes, I installed torchvision from source. |
I didn't. 0dceac0 is a
Installing from source gives you the first part of the commit hash that was build in the version, i.e. Please note, that this lookup from commit to nightly date is not guaranteed to work. Above we got lucky since the commit we were looking for was actually the last one that was included in that nightly. In general that does not need to be the case. So you often need some back and forth to find the correct date. |
Hm, there's no torch with version Not sure what to do here. Will try to build with cuda+117 and see if that helps. Update: no cuda+117 either. |
My bad, they switched the versioning scheme for the upcoming 2.0 release. The nightly you are looking for is pip install https://download.pytorch.org/whl/nightly/cu116/torch-2.0.0.dev20221213%2Bcu116-cp39-cp39-linux_x86_64.whl |
Still getting the error. It also seems like packages like New collect_env output:
|
Your env is still broken. The
The nightly releases have never been on PyPI, but only on our index. This is why you have to use the |
Here's a fixed version (I think):
torchvision is using commit: d2d448c, which I believe is a commit on January 20th at 7:58 AM EST. Yet, I'm still getting the same error. |
Thanks for confirming. Could you look for the |
Here it is:
|
So far I cannot reproduce your error. Here is what I did:
The setup completes without issues. If I now do
That is expected (Python prioritizes the local
Looking at your error message How did you install PyTorch? Did you use a clean environment? |
@pmeier thanks for the very detailed instructions. Here is a simple Dockerfile that reproduces the issue (my main Dockerfile is much too complex):
The error I get on load is:
|
Here is a Dockerfile that strips out the unnecessary things from yours and builds the image extension just fine FROM nvidia/cuda:11.8.0-devel-ubuntu22.04
RUN apt-get update && apt-get install -y software-properties-common ninja-build git curl
RUN add-apt-repository ppa:deadsnakes/ppa
RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install tzdata
RUN apt-get update && apt-get install -y python3.9 python3.9-distutils python3.9-dev
RUN apt-get update && apt-get install -y libjpeg-dev libpng-dev
RUN curl -fsSL https://bootstrap.pypa.io/get-pip.py | python3.9 - && \
pip3.9 install --no-cache-dir --upgrade pip setuptools
RUN pip install torch==2.0.0.dev20230120+cu118 --pre --extra-index-url https://download.pytorch.org/whl/nightly/cu118
RUN git clone https://github.com/pytorch/vision.git
WORKDIR /vision
RUN git checkout d2d448c71b4cb054d160000a0f63eecad7867bdb
# The version installed on the system is something like `1.build1`, which cannot be parsed by
# `pkg_resources.get_distribution` and ultimately fails the install
RUN pip install --upgrade distro-info==1.0
# I had to manually specify the library path, because otherwise torchvision would be installed in
# /usr/lib/python3.9/site-packages/, which is not recognized by the system interpreter
RUN python3.9 setup.py install --install-lib /usr/local/lib/python3.9/dist-packages/
WORKDIR /
RUN ln -s $(which python3.9) /usr/bin/python Since the issue is either an environment problem or stems from the fact that you are using an unsupported installation command, I'm closing this. Please make sure to include all the relevant information from the get go to avoid us chasing ghosts while debugging. |
Same here. with latest torchvision version 0.16.2 |
🐛 Describe the bug
gives the warning:
Versions
Collecting environment information...
PyTorch version: 1.14.0.dev20221027+cu116
Is debug build: False
CUDA used to build PyTorch: 11.6
ROCM used to build PyTorch: N/A
OS: Ubuntu 20.04.5 LTS (x86_64)
GCC version: (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
Clang version: Could not collect
CMake version: Could not collect
Libc version: glibc-2.31
Python version: 3.9.15 (main, Nov 24 2022, 14:31:59) [GCC 11.2.0] (64-bit runtime)
Python platform: Linux-5.15.0-53-generic-x86_64-with-glibc2.31
Is CUDA available: True
CUDA runtime version: Could not collect
CUDA_MODULE_LOADING set to: LAZY
GPU models and configuration:
GPU 0: NVIDIA GeForce GTX 1080 Ti
GPU 1: NVIDIA GeForce GTX 1080 Ti
Nvidia driver version: 515.65.01
cuDNN version: Probably one of the following:
/usr/lib/x86_64-linux-gnu/libcudnn.so.8.4.0
/usr/lib/x86_64-linux-gnu/libcudnn_adv_infer.so.8.4.0
/usr/lib/x86_64-linux-gnu/libcudnn_adv_train.so.8.4.0
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_infer.so.8.4.0
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_train.so.8.4.0
/usr/lib/x86_64-linux-gnu/libcudnn_ops_infer.so.8.4.0
/usr/lib/x86_64-linux-gnu/libcudnn_ops_train.so.8.4.0
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True
Versions of relevant libraries:
[pip3] mypy-boto3-cloudformation==1.25.4
[pip3] mypy-boto3-dynamodb==1.25.0
[pip3] mypy-boto3-ec2==1.25.5
[pip3] mypy-boto3-lambda==1.25.0
[pip3] mypy-boto3-rds==1.25.1
[pip3] mypy-boto3-s3==1.25.0
[pip3] mypy-boto3-sqs==1.25.0
[pip3] mypy-extensions==0.4.3
[pip3] numpy==1.23.5
[pip3] torch==1.14.0.dev20221027+cu116
[pip3] torch-tb-profiler==0.4.0
[pip3] torchdata==0.6.0.dev20221027
[pip3] torchsnapshot-nightly==2022.10.29
[pip3] torchvision==0.15.0a0+0dceac0
[conda] numpy 1.23.5 pypi_0 pypi
[conda] torch 1.14.0.dev20221027+cu116 pypi_0 pypi
[conda] torch-tb-profiler 0.4.0 pypi_0 pypi
[conda] torchdata 0.6.0.dev20221027 pypi_0 pypi
[conda] torchsnapshot-nightly 2022.10.29 pypi_0 pypi
[conda] torchvision 0.15.0a0+0dceac0 pypi_0 pypi
The text was updated successfully, but these errors were encountered: