pytorch / vision

Datasets, Transforms and Models specific to Computer Vision
https://pytorch.org/vision
BSD 3-Clause "New" or "Revised" License
16.26k stars 6.96k forks source link

none-any.whl doesnt support new versions #2622

Open AWSNB opened 4 years ago

AWSNB commented 4 years ago

πŸ› Bug

the https://download.pytorch.org/whl/torch_stable.html include older version of torchvision with none-any.whl:

torchvision-0.1.6-py2-none-any.whl torchvision-0.1.6-py3-none-any.whl torchvision-0.2.0-py2.py3-none-any.whl

these are old and dont match latest torch versions.

the problem that when perfoming pip3 install torchvision no a cpu that is not supported, the old none-any wheel is installed instead of build from source

To Reproduce:

on EC2 C6g server, ubuntu 20.04. as you can see, it is install v 0.2.2 because that's latest none-any.whl

ubuntu@ip-172-31-82-41:~$ uname -a Linux ip-172-31-82-41 5.4.0-1021-aws #21-Ubuntu SMP Fri Jul 24 09:43:03 UTC 2020 aarch64 aarch64 aarch64 GNU/Linux

ubuntu@ip-172-31-82-41:~$ pip install --pre torchvision -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html Defaulting to user installation because normal site-packages is not writeable Looking in links: https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html Collecting torchvision Downloading torchvision-0.2.2.post3-py2.py3-none-any.whl (64 kB) |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 64 kB 4.4 MB/s

Expected behavior

remove all the none-any.whl options, or keep them up to date with latest stable version

Additional context

pip3 install torchvision on AWS Graviton2 is installing old 0.2.0 that's not compatible with latest torch

pmeier commented 4 years ago

Possible duplicate of #2359. @AWSNB I'm not sure what you are trying to do. You have a CPU that is not supported by the official binaries, but you want to install from them anyway?

fmassa commented 4 years ago

cc @seemethere for what could be the best solution here -- I've seen other users facing the same issue. The reason why 0.2.0 works is because there wasn't any compiled parts in torchvision back then

seemethere commented 4 years ago

I'm also not exactly sure how you get to this point either, can you provide us with a script to reproduce this?

AWSNB commented 4 years ago

@pmeier pmeier > Possible duplicate of #2359. @AWSNB I'm not sure what you are trying to do. You have a CPU that is not supported by the official binaries, but you want to install from them anyway?

its not just me, many customers have access to processors that don't have official binaries (Arm-based MAC, AWS Graviton2 processors), and it is fine that binaries dont support all versions, but it should allow building right version from scratch or have none-any for all versions.

AWSNB commented 4 years ago

@seemethere here's a reproduction on EC2 C6g server, ubuntu 20.04. as you can see, it is install v 0.2.2 because that's latest none-any.whl

ubuntu@ip-172-31-82-41:~$ uname -a Linux ip-172-31-82-41 5.4.0-1021-aws #21-Ubuntu SMP Fri Jul 24 09:43:03 UTC 2020 aarch64 aarch64 aarch64 GNU/Linux

ubuntu@ip-172-31-82-41:~$ pip install --pre torchvision -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html Defaulting to user installation because normal site-packages is not writeable Looking in links: https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html Collecting torchvision Downloading torchvision-0.2.2.post3-py2.py3-none-any.whl (64 kB) |β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆ| 64 kB 4.4 MB/s .......

/// same thing for stable

ubuntu@ip-172-31-82-41:~$ pip install torchvision -f https://download.pytorch.org/whl/torch_stable.html Defaulting to user installation because normal site-packages is not writeable Looking in links: https://download.pytorch.org/whl/torch_stable.html Collecting torchvision Using cached torchvision-0.2.2.post3-py2.py3-none-any.whl (64 kB)

pmeier commented 4 years ago

@seemethere

AWSNB commented 4 years ago

@pmeier if the platform (like macos_arm, or aarch64) is not yet defined, python will default to none-any.whl and will install old version

was there a downside for having a none-any wheel for every new version? sounds like the right path for supporting yet to be added platforms

pmeier commented 4 years ago

@AWSNB As @fmassa stated before, as of 0.3 torchvision contains compiled parts. Thus, if you use an unsupported platform you have to compile it yourself. If you don't need anything complicated

pip install git+https://github.com/pytorch/vision@v0.7.0

should already do the trick.