mims-harvard / SubGNN

Subgraph Neural Networks (NeurIPS 2020)
https://zitniklab.hms.harvard.edu/projects/SubGNN
MIT License
185 stars 33 forks source link

AttributeError: 'SparseTensor' object has no attribute 'sample_adj' #14

Open rd27995 opened 3 years ago

rd27995 commented 3 years ago

When CONV =GIN and MINIBATCH =NeighborSampler, I get the following error message (using torch 1.4.0 and CUDA 10.1, torch-sparse=0.6.1)

Can you please suggest if there's anything I am missing here? Thanks in advance for your help!

image

wentinghome commented 3 years ago

When CONV =GIN and MINIBATCH =NeighborSampler, I get the following error message (using torch 1.4.0 and CUDA 10.1, torch-sparse=0.6.1)

Can you please suggest if there's anything I am missing here? Thanks in advance for your help!

image

I find solution from this discussion .

youngfish42 commented 2 years ago

I find new solution to this probleim

https://github.com/rusty1s/pytorch_geometric/issues/1770#issuecomment-718461015

You should update your torch-sparse >=0.6.4

just pip install torch-sparse==0.6.4

mfernezir commented 1 year ago

A comment for anybody else checking this in 2023. After running pip install torch-sparse==0.64, there's still a failure when the code internally runs

from torch_sparse import SparseTensor

https://github.com/pyg-team/pytorch_geometric/issues/1770#issuecomment-718461015 mentions additional manual hacks to get 0.6.4 working with PyTorch 1.4.0. That version of PyTorch only support 0.6.1 out of the box.

The core issue is mentioned in this comment by the repo author. GIN embeddings were done with a different PyTorch Geometric version, with code refactoring later on.