Giter VIP home page Giter VIP logo

Comments (7)

duerrsimon avatar duerrsimon commented on July 30, 2024 2

Yes that is the offending line. I think you should make the environment file more bulletproof by separating the pip from the conda parts into different files and install the torch geometric version using -f https://data.pyg.org/whl/torch-1.12.0+cu113.html (or whatever cuda version is supported by the users platform) in requirements.txt. As it is now it will pull the cpu version of pytorch geometric and I think environment.yml does not support flags in the pip part so you need separate files.

If I execute pip install -U torch-scatter torch-sparse torch-cluster torch-spline-conv torch-geometric -f https://data.pyg.org/whl/torch-1.12.0+cu113.html in the environment it does not update anything, if I pip uninstall the packages and reinstall them using this command from torch_geometric.nn.data_parallel import DataParallel works.

from diffdock.

mf-rug avatar mf-rug commented on July 30, 2024 1

pip uninstall torch-scatter torch-sparse torch-cluster torch-spline-conv torch-geometric pip install -U torch-scatter torch-sparse torch-cluster torch-spline-conv torch-geometric -f https://data.pyg.org/whl/torch-1.12.0+cu113.html Pick the cuda version that matches your pytorch cuda version that you can find out using:

import torch
torch.version.cuda

Above commands are for cuda 11.3

Sweet thanks. If this happens to anyone else, for me the error originally only happened when running on gpu, but not on cpu. After

>>> torch.version.cuda
'11.3'

$ pip uninstall torch-scatter torch-sparse torch-cluster torch-spline-conv torch-geometric
$ pip install -U torch-scatter torch-sparse torch-cluster torch-spline-conv torch-geometric -f https://data.pyg.org/whl/torch-1.12.0+cu113.html

I got this new error on cpu:

Traceback (most recent call last):
  File "/data/p273962/conda/envs/diffdock/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/data/p273962/conda/envs/diffdock/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/data/p273962/DiffDock/inference.py", line 16, in <module>
    from datasets.pdbbind import PDBBind
  File "/data/p273962/DiffDock/datasets/pdbbind.py", line 22, in <module>
    from utils.utils import read_strings_from_txt
  File "/data/p273962/DiffDock/utils/utils.py", line 12, in <module>
    from torch_geometric.nn.data_parallel import DataParallel
  File "/data/p273962/conda/envs/diffdock/lib/python3.9/site-packages/torch_geometric/nn/__init__.py", line 3, in <module>
    from .sequential import Sequential
  File "/data/p273962/conda/envs/diffdock/lib/python3.9/site-packages/torch_geometric/nn/sequential.py", line 8, in <module>
    from torch_geometric.nn.conv.utils.jit import class_from_module_repr
  File "/data/p273962/conda/envs/diffdock/lib/python3.9/site-packages/torch_geometric/nn/conv/__init__.py", line 25, in <module>
    from .spline_conv import SplineConv
  File "/data/p273962/conda/envs/diffdock/lib/python3.9/site-packages/torch_geometric/nn/conv/spline_conv.py", line 16, in <module>
    from torch_spline_conv import spline_basis, spline_weighting
  File "/data/p273962/conda/envs/diffdock/lib/python3.9/site-packages/torch_spline_conv/__init__.py", line 15, in <module>
    torch.ops.load_library(spec.origin)
  File "/data/p273962/conda/envs/diffdock/lib/python3.9/site-packages/torch/_ops.py", line 255, in load_library
    ctypes.CDLL(path)
  File "/data/p273962/conda/envs/diffdock/lib/python3.9/ctypes/__init__.py", line 382, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by /data/p273962/conda/envs/diffdock/lib/python3.9/site-packages/torch_spline_conv/_basis_cuda.so)

but I found this, and after doing

pip uninstall torch-spline-conv

it worked on cpu again. Seems like that package is not needed?

from diffdock.

duerrsimon avatar duerrsimon commented on July 30, 2024

seems related to this pyg-team/pytorch_geometric#2304

from diffdock.

gcorso avatar gcorso commented on July 30, 2024

Hi, the issue seems to arise when importing torch geometric at this line from torch_geometric.nn.data_parallel import DataParallel. Could you try running it directly in a python shell?

Unfortunately installation issues with torch geometric are very frequent, I suggest looking at issues in their repo and trying to uninstall and reinstall being careful of getting the version compatible with the pytorch version and CUDA installation.

from diffdock.

gcorso avatar gcorso commented on July 30, 2024

I'm glad it was solved! Thanks for the suggestion!

from diffdock.

mf-rug avatar mf-rug commented on July 30, 2024

Yes that is the offending line. I think you should make the environment file more bulletproof by separating the pip from the conda parts into different files and install the torch geometric version using -f https://data.pyg.org/whl/torch-1.12.0+cu113.html (or whatever cuda version is supported by the users platform) in requirements.txt. As it is now it will pull the cpu version of pytorch geometric and I think environment.yml does not support flags in the pip part so you need separate files.

If I execute pip install -U torch-scatter torch-sparse torch-cluster torch-spline-conv torch-geometric -f https://data.pyg.org/whl/torch-1.12.0+cu113.html in the environment it does not update anything, if I pip uninstall the packages and reinstall them using this command from torch_geometric.nn.data_parallel import DataParallel works.

Hi, having the same issue. Can you clarify your approach by sharing your exact commands? What exactly did you uninstall with pip, did you do it while inside the conda env, and how did you reinstall?

from diffdock.

duerrsimon avatar duerrsimon commented on July 30, 2024

pip uninstall torch-scatter torch-sparse torch-cluster torch-spline-conv torch-geometric
pip install -U torch-scatter torch-sparse torch-cluster torch-spline-conv torch-geometric -f https://data.pyg.org/whl/torch-1.12.0+cu113.html
Pick the cuda version that matches your pytorch cuda version that you can find out using:

import torch
torch.version.cuda

Above commands are for cuda 11.3

from diffdock.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.