Vision: pytorch-nightly not working with cuda if python==3.7

Created on 10 Mar 2020  ยท  7Comments  ยท  Source: pytorch/vision

I've been trying to install the nightly version of pytorch and torchvision because that seems to fix a few things, but only cpu mode works.

Steps
1.a conda create --name night37 python=3.7 create virtualenv (python 3.7)
1.b conda activate night37
1.c load cuda module load cuda10.1

  1. conda install pillow==6.2.1 tqdm ipython
  2. conda install pytorch torchvision cudatoolkit=10.1 --channel pytorch-nightly
  3. $ ipython
    >>> import torch
    >>> torch.cuda.is_available()
    out[2]: False

Using Nvidia RTX2080Ti; cuda10.1; RHEL 7, CentOS 7.4.1708

@fmassa this occurs with python 3.7, whereas in python 3.8 torch.cuda.is_available() returns True, but torchvision import breaks resulting in 1827

Binaries were downloaded the 9th of March

binaries

All 7 comments

Thanks for the bug report!

@seemethere do you know what might be the issue?

This seems fine to me? I cannot reproduce on my local machine

test37 โฏ python -c 'import torch; print(torch.__version__);print(torch.cuda.is_available())'
1.5.0.dev20200310
True

Could you print the output of:

python -c 'import torch; print(torch.__version__);print(torch.cuda.is_available())'

Just made a new virtual env, ssh'd in the compute node and loaded cuda10.1 just to make sure everything was in place.
minimal steps pertaining python are:

  1. conda create --name testenv python=3.7
  2. conda install pytorch torchvision cudatoolkit=10.1 -c pytorch-nightly
  3. python -c 'import torch; print(torch.__version__);print(torch.cuda.is_available())'
    out: 1.3.1, False
    (I guess I could have checked pytorch version after installing).
    Installing with pip (in the same env and after removing conda's packages) works fine, as it returns:
    1.5.0.dev20200309, True so there's a chance the conda channel 'torch-nightly' isn't up to date.

In the end, building from source managed to fix both #1827 and pytorch's #4107, which was my main reason to install keira

This looks to be related to the conda uploads failing and our pruner pruning all nightlies available for linux for torchvision.

I have submitted #1960 which should resolve the nightly uploads and will solve this issue.

@mknw Something unrelated: Looks like you didn't activate the new environment and the packages are install in the base environment. Maybe it is just a typo.

@peterjc123 yep, typo
@seemethere thank you, glad I could help!

Thanks @mknw @peterjc123 and @seemethere for the help!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

fmassa picture fmassa  ยท  30Comments

soldierofhell picture soldierofhell  ยท  36Comments

Jonas1312 picture Jonas1312  ยท  23Comments

timonbimon picture timonbimon  ยท  28Comments

h6197627 picture h6197627  ยท  23Comments