TUM-DAML/pprgo_pytorch

Pytorch, torch_scatter, torch_sparse version issue

Closed this issue · 3 comments

Hi, I got some issues sorting versions of these three packages. Could you let me know the versions of your pytorch, torch_scatter, and torch_sparse? Thanks!

Does it not work with the most recent versions? If so, it would be very helpful if you provided an error message so we can fix this.

Yes, I finally successfully configured the versions. For anyone whose CUDA version is not the latest (i.e. 10.2) and may have the same problem, please check the solutions below:

  1. Uninstall your PyTorch, torch-sparse and torch-scatter using pip uninstall xxx
  2. Go to this website and find a suitable version that matches your python, CUDA and OS, e.g. 'cu101/torch-1.4.0-cp35-cp35m-win_amd64.whl' for CUDA == 10.1, python == 3.5 and OS == Windows. Dowload the .whl file on your platform.
  3. Go to this website and find suitable versions for your torch-sparse and torch-scatter, follow the same rule in step 2. Download them on your platform.
  4. Install Pytorch, torch-scatter and torch-sparse that you just downloaded by using 'pip install xxx.whl'
  5. Restart the service on your jupyter notebook.

Please note that although you install the exact versions of them that match your environment, problem may still occur in the 'train' statement saying that the # of return parameters do not match (i.e. Expected 4, got 3). This is because the versions in between these three packages do not match. The solution is to test every potential version of it (e.g. torch-sparse == 0.5.1, 0.6.0, 0.6.1) and you'll find the one that matches correctly!

I'll just list out my environment that works fine:
CUDA == 10.1, Python = 3.7.6, Pytorch == 1.4.0, torch-scatter == 2.0.3, torch-sparse == 0.6.1, OS == Linux

Thank you for sorting this out. Great to hear that it's working now!

For PyTorch scatter/sparse I'd rather recommend looking at the installation instructions here, i.e. just installing the latest version for your PyTorch version.