Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Qustion] python main.py --cfg configs/IC50-DeepDTA.yaml #79

Closed
liu-mei-chen opened this issue Mar 17, 2021 · 6 comments
Closed

[Qustion] python main.py --cfg configs/IC50-DeepDTA.yaml #79

liu-mei-chen opened this issue Mar 17, 2021 · 6 comments
Assignees
Labels
bug Something isn't working
Projects

Comments

@liu-mei-chen
Copy link

馃悰 Bug

To reproduce

Steps to reproduce the behavior:

  1. Install PyTorch
  2. Install PyTorch Geometric
  3. git clone https://github.com/pykale/pykale
  4. cd pykale
  5. pip install .
  6. 路路路路(all instructions step by step)
  7. conda install -c conda-forge rdkit
  8. pip install PyTDC
  9. python main.py --cfg configs/IC50-DeepDTA.yaml

** Stack trace/error message **

Traceback (most recent call last):
  File "main.py", line 6, in <module>
    from model import get_model
  File "/Users/awei/Downloads/pykale/examples/bindingdb_deepdta/model.py", line 1, in <module>
    from kale.embed.seq_nn import CNNEncoder
  File "/Users/awei/Downloads/pykale/kale/embed/seq_nn.py", line 7, in <module>
    from torch_geometric.nn import GCNConv, global_max_pool
  File "/Users/awei/opt/anaconda3/envs/pykale/lib/python3.6/site-packages/torch_geometric/__init__.py", line 2, in <module>
    import torch_geometric.nn
  File "/Users/awei/opt/anaconda3/envs/pykale/lib/python3.6/site-packages/torch_geometric/nn/__init__.py", line 2, in <module>
    from .data_parallel import DataParallel
  File "/Users/awei/opt/anaconda3/envs/pykale/lib/python3.6/site-packages/torch_geometric/nn/data_parallel.py", line 5, in <module>
    from torch_geometric.data import Batch
  File "/Users/awei/opt/anaconda3/envs/pykale/lib/python3.6/site-packages/torch_geometric/data/__init__.py", line 1, in <module>
    from .data import Data
  File "/Users/awei/opt/anaconda3/envs/pykale/lib/python3.6/site-packages/torch_geometric/data/data.py", line 8, in <module>
    from torch_sparse import coalesce, SparseTensor
  File "/Users/awei/opt/anaconda3/envs/pykale/lib/python3.6/site-packages/torch_sparse/__init__.py", line 2, in <module>
    from .coalesce import coalesce
  File "/Users/awei/opt/anaconda3/envs/pykale/lib/python3.6/site-packages/torch_sparse/coalesce.py", line 2, in <module>
    import torch_scatter
  File "/Users/awei/opt/anaconda3/envs/pykale/lib/python3.6/site-packages/torch_scatter/__init__.py", line 14, in <module>
    f'{library}_{suffix}', [osp.dirname(__file__)]).origin)
  File "/Users/awei/opt/anaconda3/envs/pykale/lib/python3.6/site-packages/torch/_ops.py", line 104, in load_library
    ctypes.CDLL(path)
  File "/Users/awei/opt/anaconda3/envs/pykale/lib/python3.6/ctypes/__init__.py", line 348, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: dlopen(/Users/awei/opt/anaconda3/envs/pykale/lib/python3.6/site-packages/torch_scatter/_scatter_cpu.so, 6): Symbol not found: __ZNK3c104Type14isSubtypeOfExtENSt3__110shared_ptrIS0_EEPNS1_13basic_ostreamIcNS1_11char_traitsIcEEEE
  Referenced from: /Users/awei/opt/anaconda3/envs/pykale/lib/python3.6/site-packages/torch_scatter/_scatter_cpu.so
  Expected in: /Users/awei/opt/anaconda3/envs/pykale/lib/python3.6/site-packages/torch/lib/libtorch_cpu.dylib
 in /Users/awei/opt/anaconda3/envs/pykale/lib/python3.6/site-packages/torch_scatter/_scatter_cpu.so

Expected Behaviour

Environment

active environment : pykale
active env location : /Users/awei/opt/anaconda3/envs/pykale
shell level : 1
user config file : /Users/awei/.condarc
populated config files : /Users/awei/.condarc
conda version : 4.9.2
conda-build version : 3.18.11
python version : 3.8.3.final.0
virtual packages : __osx=10.16=0
__unix=0=0
__archspec=1=x86_64
base environment : /Users/awei/opt/anaconda3 (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/osx-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/osx-64
https://repo.anaconda.com/pkgs/r/noarch
package cache : /Users/awei/opt/anaconda3/pkgs
/Users/awei/.conda/pkgs
envs directories : /Users/awei/opt/anaconda3/envs
/Users/awei/.conda/envs
platform : osx-64
user-agent : conda/4.9.2 requests/2.24.0 CPython/3.8.3 Darwin/20.3.0 OSX/10.16
UID:GID : 501:20
netrc file : None
offline mode : False


 - PyTorch Version (e.g., 1.0):  1.8.0
 - OS (e.g., Linux): mac
 - How you installed PyTorch (`conda`, `pip`, source): pip and conda (I have tried both)
 - Build command you used (if compiling from source):
 - Python version: 3.6.13
 - CUDA/cuDNN version: null
 - GPU models and configuration: null
 - Any other relevant information: 

## Additional context

torch-cluster             1.5.9                    pypi_0    pypi
torch-geometric           1.6.3                 pypi_0    pypi
torch-scatter             2.0.6                    pypi_0    pypi
torch-sparse            0.4.4                     pypi_0    pypi
@liu-mei-chen liu-mei-chen added the bug Something isn't working label Mar 17, 2021
@liudaotan
Copy link

I have a similar issues on the same step (Mac), but every thing goes well on my windows.

The environment:

active environment : base
    active env location : /opt/anaconda3
            shell level : 1
       user config file : /Users/liudaotan/.condarc
 populated config files : /Users/liudaotan/.condarc
          conda version : 4.9.2
    conda-build version : 3.20.5
         python version : 3.8.5.final.0
       virtual packages : __osx=10.16=0
                          __unix=0=0
                          __archspec=1=x86_64
       base environment : /opt/anaconda3  (writable)
           channel URLs : https://repo.anaconda.com/pkgs/main/osx-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/osx-64
                          https://repo.anaconda.com/pkgs/r/noarch
          package cache : /opt/anaconda3/pkgs
                          /Users/liudaotan/.conda/pkgs
       envs directories : /opt/anaconda3/envs
                          /Users/liudaotan/.conda/envs
               platform : osx-64
             user-agent : conda/4.9.2 requests/2.24.0 CPython/3.8.5 Darwin/20.3.0 OSX/10.16
                UID:GID : 501:20
             netrc file : None
           offline mode : False
 - PyTorch Version (e.g., 1.0):  1.7.1
 - OS (e.g., Linux): mac
 - How you installed PyTorch (`conda`, `pip`, source): pip 
 - Build command you used (if compiling from source):
 - Python version: 3.8.5
 - CUDA/cuDNN version: null
 - GPU models and configuration: null
 - Any other relevant information: 
 
torch-cluster             1.5.9                    pypi_0    pypi
torch-geometric           1.6.3                    pypi_0    pypi
torch-scatter             2.0.6                    pypi_0    pypi
torch-sparse              0.6.8                    pypi_0    pypi

** Stack trace/error message **

Traceback (most recent call last):
  File "main.py", line 6, in <module>
    from model import get_model
  File "/Users/liudaotan/pykale/examples/bindingdb_deepdta/model.py", line 1, in <module>
    from kale.embed.seq_nn import CNNEncoder
  File "/Users/liudaotan/Desktop/pykale/kale/embed/seq_nn.py", line 7, in <module>
    from torch_geometric.nn import GCNConv, global_max_pool
  File "/opt/anaconda3/lib/python3.8/site-packages/torch_geometric/__init__.py", line 2, in <module>
    import torch_geometric.nn
  File "/opt/anaconda3/lib/python3.8/site-packages/torch_geometric/nn/__init__.py", line 2, in <module>
    from .data_parallel import DataParallel
  File "/opt/anaconda3/lib/python3.8/site-packages/torch_geometric/nn/data_parallel.py", line 5, in <module>
    from torch_geometric.data import Batch
  File "/opt/anaconda3/lib/python3.8/site-packages/torch_geometric/data/__init__.py", line 1, in <module>
    from .data import Data
  File "/opt/anaconda3/lib/python3.8/site-packages/torch_geometric/data/data.py", line 8, in <module>
    from torch_sparse import coalesce, SparseTensor
  File "/opt/anaconda3/lib/python3.8/site-packages/torch_sparse/__init__.py", line 12, in <module>
    torch.ops.load_library(importlib.machinery.PathFinder().find_spec(
  File "/opt/anaconda3/lib/python3.8/site-packages/torch/_ops.py", line 105, in load_library
    ctypes.CDLL(path)
  File "/opt/anaconda3/lib/python3.8/ctypes/__init__.py", line 381, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: dlopen(/opt/anaconda3/lib/python3.8/site-packages/torch_sparse/_version.so, 6): no suitable image found.  Did find:
	/opt/anaconda3/lib/python3.8/site-packages/torch_sparse/_version.so: mach-o, but wrong architecture
	/opt/anaconda3/lib/python3.8/site-packages/torch_sparse/_version.so: mach-o, but wrong architecture

@haipinglu
Copy link
Member

@pz-white Could you look into this issue on MacOS to see how to resolve the issue? Thanks.

@haipinglu haipinglu added this to To do (sorted by urgency) in v0.1.0 via automation Mar 17, 2021
@peizhenbai
Copy link
Collaborator

peizhenbai commented Mar 17, 2021

@liudaotan Is your Mac M1 chip or Intel core? It seems to be an architecture issue and mostly produced on new M1 Mac.

@peizhenbai
Copy link
Collaborator

@liu-mei-chen, do you have multiple pytorch packages? The error seems that the libtorch_cpu.dylib in torch cannot be loaded.

@liudaotan
Copy link

@liudaotan Is your Mac M1 chip or Intel core? It seems to be an architecture issue and mostly produced on new M1 Mac.

Yes, you are right, my Mac is m1 chip.

@liu-mei-chen
Copy link
Author

@liu-mei-chen, do you have multiple pytorch packages? The error seems that the libtorch_cpu.dylib in torch cannot be loaded.

yeah, I installed pytorch twice, although only one version was shown. I had recreated the environment, everything is working now. Thank you

v0.1.0 automation moved this from To do (sorted by urgency) to Done Mar 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
v0.1.0
  
Done
Development

No branches or pull requests

4 participants