divelab / GOOD

GOOD: A Graph Out-of-Distribution Benchmark [NeurIPS 2022 Datasets and Benchmarks]
https://good.readthedocs.io/
GNU General Public License v3.0
180 stars 19 forks source link

报错OSError: /home/.local/lib/python3.8/site-packages/torch_sparse/_convert_cuda.so: undefined symbol: _ZN6caffe28TypeMeta21_typeMetaDataInstanceIdEEPKNS_6detail12TypeMetaDataEv #20

Closed bruno686 closed 8 months ago

CM-BF commented 8 months ago

Hi bruno686,

Thank you for reaching out with your issue. To better assist you, could you please provide some additional details including environment details, installation method, error context? Have you made any modifications to the project or the environment that might affect standard module imports? Have you attempted any solutions on your own? If so, could you share what you've tried and the outcomes?

Any specific and concrete suggestion is highly appreciated.

Best, Shurui

bruno686 commented 8 months ago

Traceback (most recent call last): File "/home/hezhuangzhuang/.conda/envs/good/bin/goodtg", line 33, in sys.exit(load_entry_point('graph-ood', 'console_scripts', 'goodtg')()) File "/home/hezhuangzhuang/.conda/envs/good/bin/goodtg", line 25, in importlib_load_entry_point return next(matches).load() File "/home/hezhuangzhuang/.conda/envs/good/lib/python3.8/importlib/metadata.py", line 77, in load module = import_module(match.group('module')) File "/home/hezhuangzhuang/.conda/envs/good/lib/python3.8/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 961, in _find_and_load_unlocked File "", line 219, in _call_with_frames_removed File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 961, in _find_and_load_unlocked File "", line 219, in _call_with_frames_removed File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "", line 843, in exec_module File "", line 219, in _call_with_frames_removed File "/home/hezhuangzhuang/GOOD/GOOD/init.py", line 3, in from . import data, networks, ood_algorithms File "/home/hezhuangzhuang/GOOD/GOOD/data/init.py", line 4, in from GOOD.data.dataset_manager import load_dataset, create_dataloader File "/home/hezhuangzhuang/GOOD/GOOD/data/dataset_manager.py", line 4, in from torch_geometric.loader import DataLoader, GraphSAINTRandomWalkSampler File "/home/hezhuangzhuang/.local/lib/python3.8/site-packages/torch_geometric/init.py", line 5, in import torch_geometric.data File "/home/hezhuangzhuang/.local/lib/python3.8/site-packages/torch_geometric/data/init.py", line 1, in from .data import Data File "/home/hezhuangzhuang/.local/lib/python3.8/site-packages/torch_geometric/data/data.py", line 8, in from torch_sparse import coalesce, SparseTensor File "/home/hezhuangzhuang/.local/lib/python3.8/site-packages/torch_sparse/init.py", line 14, in torch.ops.load_library(importlib.machinery.PathFinder().find_spec( File "/home/hezhuangzhuang/.conda/envs/good/lib/python3.8/site-packages/torch/_ops.py", line 110, in load_library ctypes.CDLL(path) File "/home/hezhuangzhuang/.conda/envs/good/lib/python3.8/ctypes/init.py", line 373, in init self._handle = _dlopen(self._name, mode) OSError: /home/hezhuangzhuang/.local/lib/python3.8/site-packages/torch_sparse/_convert_cuda.so: undefined symbol: _ZN6caffe28TypeMeta21_typeMetaDataInstanceIdEEPKNS_6detail12TypeMetaDataEv

完整的按照教程,创建了一个新的环境,并且执行了coda的三条指令,以及pip install -e .。这个过程没有报错,但是在执行指令goodtg --config_path GOOD_configs/GOODCMNIST/color/concept/DANN.yaml时报出上面的错误

bruno686 commented 8 months ago

这是目前的pip包安装的情况

Package Version Editable project location


absl-py 1.0.0 alabaster 0.7.13 antlr4-python3-runtime 4.9.3 ase 3.22.1 asttokens 2.2.1 astunparse 1.6.3 attrs 23.2.0 Babel 2.14.0 backcall 0.2.0 beautifulsoup4 4.12.2 Bottleneck 1.3.5 Brotli 1.0.9 cachetools 4.2.4 captum 0.2.0 certifi 2023.11.17 cffi 1.16.0 charset-normalizer 2.0.4 cilog 1.3.0 cleanlab 2.2.0 cloudpickle 3.0.0 comm 0.1.2 coverage 7.4.0 cryptography 41.0.7 cvxopt 1.3.2 cycler 0.11.0 debugpy 1.6.5 decorator 5.1.1 dive-into-graphs 1.1.0 docutils 0.17.1 entrypoints 0.4 et-xmlfile 1.1.0 execnet 2.0.2 executing 1.2.0 filelock 3.13.1 fonttools 4.37.1 gast 0.3.3 gdown 4.7.1 google-auth 2.26.0 google-auth-oauthlib 0.4.6 google-pasta 0.2.0 googledrivedownloader 0.4 graph-ood 1.1.1 /home/hezhuangzhuang/GOOD grpcio 1.60.0 h5py 2.10.0 hydra-core 1.3.2 idna 3.4 imagesize 1.4.1 importlib-metadata 4.10.1 importlib-resources 6.1.1 iniconfig 2.0.0 install 1.3.5 ipdb 0.13.9 ipykernel 6.20.1 ipython 8.8.0 isodate 0.6.1 jedi 0.18.2 Jinja2 3.1.2 joblib 1.1.0 jupyter_client 7.4.8 jupyter_core 5.1.3 Keras 1.0.3 Keras-Preprocessing 1.1.2 kiwisolver 1.4.4 littleutils 0.2.2 llvmlite 0.39.1 Markdown 3.3.6 MarkupSafe 2.1.1 matplotlib 3.5.2 matplotlib-inline 0.1.6 mkl-fft 1.3.1 mkl-random 1.2.2 mkl-service 2.4.0 mpmath 1.3.0 munch 2.5.0 mypy-extensions 1.0.0 nest-asyncio 1.5.6 networkx 2.8 numba 0.56.2 numexpr 2.8.4 numpy 1.22.1 oauthlib 3.1.1 ogb 1.3.4 olefile 0.47 omegaconf 2.3.0 openpyxl 3.0.10 opt-einsum 3.3.0 outdated 0.2.1 packaging 23.0 pandas 1.4.4 parso 0.8.3 pexpect 4.8.0 pickleshare 0.7.5 Pillow 9.2.0 pip 23.3.1 platformdirs 3.10.0 pluggy 1.3.0 pooch 1.7.0 prompt-toolkit 3.0.36 protobuf 3.20.1 psutil 5.9.4 ptyprocess 0.7.0 pure-eval 0.2.2 py 1.11.0 pyasn1 0.4.8 pyasn1-modules 0.2.8 pybind11 2.10.0 pycparser 2.21 Pygments 2.14.0 pynvml 11.5.0 pyOpenSSL 23.2.0 pyparsing 3.0.9 pyscf 2.4.0 PySocks 1.7.1 pytest 7.1.2 pytest-cov 3.0.0 pytest-forked 1.6.0 pytest-xdist 2.5.0 python-dateutil 2.8.2 python-louvain 0.16 pytz 2022.2.1 PyYAML 6.0 pyzmq 24.0.1 rdflib 6.2.0 rdkit-pypi 2022.9.5 requests 2.31.0 requests-oauthlib 1.3.0 rgmining-common 0.9.1 rgmining-fraud-eagle 0.9.7 rsa 4.8 ruamel.yaml 0.17.21 ruamel.yaml.clib 0.2.8 scikit-learn 1.1.2 scipy 1.10.1 setuptools 59.5.0 shap 0.44.0 six 1.16.0 slicer 0.0.7 snowballstemmer 2.2.0 soupsieve 2.5 Sphinx 5.3.0 sphinx-rtd-theme 1.0.0 sphinxcontrib-applehelp 1.0.4 sphinxcontrib-devhelp 1.0.2 sphinxcontrib-htmlhelp 2.0.1 sphinxcontrib-jsmath 1.0.1 sphinxcontrib-qthelp 1.0.3 sphinxcontrib-serializinghtml 1.1.5 stack-data 0.6.2 sympy 1.12 tabulate 0.9.0 tensorboard 2.8.0 tensorboard-data-server 0.6.1 tensorboard-plugin-wit 1.8.1 tensorflow-estimator 2.2.0 termcolor 1.1.0 Theano 1.0.5 threadpoolctl 3.1.0 toml 0.10.2 tomli 2.0.1 torch 1.10.1 torch-cluster 1.5.9 torch-geometric 1.7.0 torch-scatter 2.0.5 torch-sparse 0.6.9 torch-spline-conv 1.2.1 torchaudio 0.10.1 torchvision 0.11.2 tornado 6.2 tqdm 4.64.0 traitlets 5.8.1 typed-argument-parser 1.7.2 typing_extensions 4.3.0 typing-inspect 0.9.0 tzdata 2023.3 urllib3 1.26.18 wcwidth 0.2.5 Werkzeug 2.0.2 wheel 0.41.2 wrapt 1.13.3 yacs 0.1.6 zipp 3.7.0

CM-BF commented 8 months ago

Hi zhuangzhuang,

Thank you for your comprehensive feedback. The major issue in your environment I noticed is the installation of torch-geometric. Please note that torch-geometric (PyG) version $\ge 2$ is not compatible with older versions including the dataset class. Therefore, I highly recommend trying to solve the problem by installing pyg >= 2.0 as the first step.

Furthermore, the error message seems to indicate incompatible CUDA versions. If the error persists after installing pyg >=2.0, my suggestion is to check whether your cudatoolkit version is higher than 11.3. If not, try to install it through Conda. (Reference: https://anaconda.org/nvidia/cuda-toolkit)

Please let me know if you have further questions.

Best, Shurui

bruno686 commented 8 months ago

我换到了另一台服务器上运行成功,有一些TIPS想分享一下: 1.这个库需要glibc>2.27,ubuntu16上是不行的,只能在ubuntu18; 2.在numpy部分会出现报错,需要把np.float改成np.float64,这样才可以运行; 3.对于在国内的用户,数据集可以先下载下来再加入到GOOD,因为gdown可能无效。

最后非常感谢作者内心的解答!

CM-BF commented 8 months ago

Thank you for sharing these useful tips! We will modify the doc to incorporate them. As the issue was solved, I'll close this issue.