Pytorch_geometric: Pytorch 1.2.0 compatibility

Created on 8 Aug 2019  ·  3Comments  ·  Source: rusty1s/pytorch_geometric

Thanks for the great package!
When I upgraded Pytorch to ver 1.2.0 (just released today), I had the following error. Could you handle this problem (maybe in the next update)? Thanks.

File "/anaconda3/lib/python3.7/site-packages/torch_geometric/__init__.py", line 2, in <module> import torch_geometric.nn File "/anaconda3/lib/python3.7/site-packages/torch_geometric/nn/__init__.py", line 2, in <module> from .data_parallel import DataParallel File "/anaconda3/lib/python3.7/site-packages/torch_geometric/nn/data_parallel.py", line 5, in <module> from torch_geometric.data import Batch File "/anaconda3/lib/python3.7/site-packages/torch_geometric/data/__init__.py", line 1, in <module> from .data import Data File "/anaconda3/lib/python3.7/site-packages/torch_geometric/data/data.py", line 7, in <module> from torch_sparse import coalesce File "/anaconda3/lib/python3.7/site-packages/torch_sparse/__init__.py", line 2, in <module> from .coalesce import coalesce File "/anaconda3/lib/python3.7/site-packages/torch_sparse/coalesce.py", line 2, in <module> import torch_scatter File "/anaconda3/lib/python3.7/site-packages/torch_scatter/__init__.py", line 3, in <module> from .mul import scatter_mul File "/anaconda3/lib/python3.7/site-packages/torch_scatter/mul.py", line 3, in <module> from torch_scatter.utils.ext import get_func File "/anaconda3/lib/python3.7/site-packages/torch_scatter/utils/ext.py", line 2, in <module> import torch_scatter.scatter_cpu ImportError: dlopen(/anaconda3/lib/python3.7/site-packages/torch_scatter/scatter_cpu.cpython-37m-darwin.so, 2): Symbol not found: __ZN2at19NonVariableTypeMode10is_enabledEv Referenced from: /anaconda3/lib/python3.7/site-packages/torch_scatter/scatter_cpu.cpython-37m-darwin.so Expected in: flat namespace in /anaconda3/lib/python3.7/site-packages/torch_scatter/scatter_cpu.cpython-37m-darwin.so

Most helpful comment

hello @weihua916 :
just re-install (uninstall and then install again) them.

OS: Ubuntu 18.04, NO NVIDIA GPU.

take torch-scatter for example. (in fact, all 5(torch-scatter, torch-sparse torch-cluster torch-spline-conv torch-geometric) should meet the same problem.)

same problem
2019-08-09 08-35-02 的屏幕截图

re-install works fine
2019-08-09 08-35-09 的屏幕截图

PyG:
2019-08-09 08-44-11 的屏幕截图

P.S. I guess, once pytorch is upgraded (like this issue), the installed extensions have to be re-installed? Re-install rebuilds .o(object), .a ,.so(shared object) in *NIX (Linux, macOS), or .obj, .lib, .dll(respectively) in Windows.
If some time later, pytorch's windows package distribution upgraded to 1.2.0, I will upgraed pytorch 1.2.0, and "have to" re-install them.

(sorry, my english is very poor, and i hope 3 screenshots may help)

See FAQ's 8.

yours,
@wmf1997

All 3 comments

hello @weihua916 :
just re-install (uninstall and then install again) them.

OS: Ubuntu 18.04, NO NVIDIA GPU.

take torch-scatter for example. (in fact, all 5(torch-scatter, torch-sparse torch-cluster torch-spline-conv torch-geometric) should meet the same problem.)

same problem
2019-08-09 08-35-02 的屏幕截图

re-install works fine
2019-08-09 08-35-09 的屏幕截图

PyG:
2019-08-09 08-44-11 的屏幕截图

P.S. I guess, once pytorch is upgraded (like this issue), the installed extensions have to be re-installed? Re-install rebuilds .o(object), .a ,.so(shared object) in *NIX (Linux, macOS), or .obj, .lib, .dll(respectively) in Windows.
If some time later, pytorch's windows package distribution upgraded to 1.2.0, I will upgraed pytorch 1.2.0, and "have to" re-install them.

(sorry, my english is very poor, and i hope 3 screenshots may help)

See FAQ's 8.

yours,
@wmf1997

Perfect answer :) Does this resolve your issues @weihua916?

Edit: PyTorch 1.2 introduced some changes to masking which may break our code in some ops, see here. I will fix this ASAP.

The Travis builds now work again with PyTorch 1.2. There was a small incompatibility with torch-cluster's knn method, which is fixed in torch-cluster==1.4.4. I consider this issue to be solved. Thanks all.

Was this page helpful?
0 / 5 - 0 ratings