Error inference with single files and torch_geometric
See original GitHub issueI installed this in a fresh environment using the provided environment.yml. but it fails on inference. I attached the two files (renamed to txt for upload)
The esm embedding step works:
(diffdock) $ HOME=esm/model_weights python esm/scripts/extract.py esm2_t33_650M_UR50D data/prepared_for_esm.fasta data/esm2_output --repr_layers 33 --include per_tok
Downloading: "https://dl.fbaipublicfiles.com/fair-esm/models/esm2_t33_650M_UR50D.pt" to esm/model_weights/.cache/torch/hub/checkpoints/esm2_t33_650M_UR50D.pt
Downloading: "https://dl.fbaipublicfiles.com/fair-esm/regression/esm2_t33_650M_UR50D-contact-regression.pt" to esm/model_weights/.cache/torch/hub/checkpoints/esm2_t33_650M_UR50D-contact-regression.pt
Transferred model to GPU
Read data/prepared_for_esm.fasta with 2 sequences
Processing 1 of 1 batches (2 sequences)
I get the following error when executing this command in the root dir of the project. I did not download the data and used single sdf and pdb files but according to the README that should work. data/esm2_output
contains two .pt
files: 1cbr_protein.pdb_chain_0.pt 1cbr_protein.pdb_chain_1.pt
(diffdock) $ python -m inference --ligand_path examples/1cbr_ligand.sdf --protein_path examples/1cbr_protein.pdb --out_dir results/user_predictions_small --inference_steps 20 --samples_per_complex 40 --batch_size 10
Traceback (most recent call last):
File "/home/duerr/miniconda3/envs/diffdock/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/home/duerr/miniconda3/envs/diffdock/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/share/lcbcsrv5/lcbcdata/duerr/PhD/08_Code/DiffDock/inference.py", line 16, in <module>
from datasets.pdbbind import PDBBind
File "/share/lcbcsrv5/lcbcdata/duerr/PhD/08_Code/DiffDock/datasets/pdbbind.py", line 22, in <module>
from utils.utils import read_strings_from_txt
File "/share/lcbcsrv5/lcbcdata/duerr/PhD/08_Code/DiffDock/utils/utils.py", line 12, in <module>
from torch_geometric.nn.data_parallel import DataParallel
File "/home/duerr/miniconda3/envs/diffdock/lib/python3.9/site-packages/torch_geometric/nn/__init__.py", line 3, in <module>
from .sequential import Sequential
File "/home/duerr/miniconda3/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 "/home/duerr/miniconda3/envs/diffdock/lib/python3.9/site-packages/torch_geometric/nn/conv/__init__.py", line 25, in <module>
from .spline_conv import SplineConv
File "/home/duerr/miniconda3/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 "/home/duerr/miniconda3/envs/diffdock/lib/python3.9/site-packages/torch_spline_conv/__init__.py", line 11, in <module>
torch.ops.load_library(importlib.machinery.PathFinder().find_spec(
AttributeError: 'NoneType' object has no attribute 'origin'
Issue Analytics
- State:
- Created a year ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
OSError: /lib64/libm.so.6: version `GLIBC_2.27' not found #3593
Installation I have followed the instructions on the pytorch geometric website, and am repeatedly getting this error.
Read more >Issue with Pytorch geometric - Trainer
I am having an issue with a super simple PyG model when integrating it with Pytorch Lightning. ... As one can check, each...
Read more >Installation — pytorch_geometric documentation
We collected a lot of common installation errors in the Frequently Asked ... file not recognized: file format not recognized : Clean the...
Read more >Dlopen error in loading pytorch geometric - Stack Overflow
This seems to be a problem with the lib files of your present environment. I suggest activating into your environment.
Read more >How to fix “CUDA error: device-side assert triggered” error?
I use huggingface Transformer to fine-tune a binary classification model. When I do inference job on big data. In rare case, it will...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
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 thinkenvironment.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 commandfrom torch_geometric.nn.data_parallel import DataParallel
works.Sweet thanks. If this happens to anyone else, for me the error originally only happened when running on gpu, but not on cpu. After
I got this new error on cpu:
but I found this, and after doing
pip uninstall torch-spline-conv
it worked on cpu again. Seems like that package is not needed?