GraphGym icon indicating copy to clipboard operation
GraphGym copied to clipboard

error when running test script:

Open Spartanzhao opened this issue 5 months ago • 2 comments

I had installed the graph gym step by step as readme mentioned, But I got this error: Traceback (most recent call last): File "main.py", line 5, in from torch_geometric import seed_everything File "/data02/home/scv9476/.conda/envs/graphgym_env/lib/python3.7/site-packages/torch_geometric/init.py", line 1, in import torch_geometric.utils File "/data02/home/scv9476/.conda/envs/graphgym_env/lib/python3.7/site-packages/torch_geometric/utils/init.py", line 3, in from .scatter import scatter File "/data02/home/scv9476/.conda/envs/graphgym_env/lib/python3.7/site-packages/torch_geometric/utils/scatter.py", line 7, in import torch_geometric.typing File "/data02/home/scv9476/.conda/envs/graphgym_env/lib/python3.7/site-packages/torch_geometric/typing.py", line 37, in import torch_sparse # noqa File "/data02/home/scv9476/.conda/envs/graphgym_env/lib/python3.7/site-packages/torch_sparse/init.py", line 40, in from .tensor import SparseTensor # noqa File "/data02/home/scv9476/.conda/envs/graphgym_env/lib/python3.7/site-packages/torch_sparse/tensor.py", line 13, in class SparseTensor(object): File "/data02/home/scv9476/.conda/envs/graphgym_env/lib/python3.7/site-packages/torch/jit/_script.py", line 974, in script _compile_and_register_class(obj, _rcb, qualified_name) File "/data02/home/scv9476/.conda/envs/graphgym_env/lib/python3.7/site-packages/torch/jit/_script.py", line 67, in _compile_and_register_class torch._C._jit_script_class_compile(qualified_name, ast, defaults, rcb) RuntimeError: Tried to access nonexistent attribute or method 'crow_indices' of type 'Tensor'.: File "/data02/home/scv9476/.conda/envs/graphgym_env/lib/python3.7/site-packages/torch_sparse/tensor.py", line 109 def from_torch_sparse_csr_tensor(self, mat: torch.Tensor, has_value: bool = True): rowptr = mat.crow_indices() ~~~~~~~~~~~~~~~~ <--- HERE col = mat.col_indices()

How Can I solve this issue?

Spartanzhao avatar Feb 04 '24 01:02 Spartanzhao