BorgwardtLab / TOGL

Topological Graph Neural Networks (ICLR 2022)
https://openreview.net/pdf?id=oxxUMeFwEHd
BSD 3-Clause "New" or "Revised" License
105 stars 20 forks source link

AttributeError( AttributeError: 'GlobalStorage' object has no attribute '__slices__') #9

Closed mohit-kumar-27 closed 2 years ago

mohit-kumar-27 commented 2 years ago

Hi Bastain I resolved the earlier issue related to Pytorch Lightning, and tried running your code again I ran the command (togl) mohit@xavier:~/TOGL$ WANDB_MODE=disabled python topognn/train_model.py --model TopoGNN --dataset DD --batch_size 20 --lr 0.0007

The traceback of the error is as follows:

  File "/scott/mohit/anaconda3/envs/togl/lib/python3.8/site-packages/topognn/models.py", line 412, in validation_step
    y_hat = self(batch)

  File "/scott/mohit/anaconda3/envs/togl/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
    return forward_call(*input, **kwargs)

  File "/scott/mohit/anaconda3/envs/togl/lib/python3.8/site-packages/topognn/models.py", line 607, in forward
    x, x_dim1, filtration = self.topo1(x, data, return_filtration)

  File "/scott/mohit/anaconda3/envs/togl/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
    return forward_call(*input, **kwargs)

  File "/scott/mohit/anaconda3/envs/togl/lib/python3.8/site-packages/topognn/models.py", line 190, in forward
    batch = remove_duplicate_edges(batch)

  File "/scott/mohit/anaconda3/envs/togl/lib/python3.8/site-packages/topognn/data_utils.py", line 72, in remove_duplicate_edges
    edge_slices = torch.tensor(batch.__slices__["edge_index"],device= device)

  File "/scott/mohit/anaconda3/envs/togl/lib/python3.8/site-packages/torch_geometric/data/data.py", line 362, in __getattr__
    return getattr(self._store, key)

  File "/scott/mohit/anaconda3/envs/togl/lib/python3.8/site-packages/torch_geometric/data/storage.py", line 52, in __getattr__
    raise AttributeError(
AttributeError: 'GlobalStorage' object has no attribute '__slices__'
mohit-kumar-27 commented 2 years ago

I found out that the issue is due to version mismatch of pytorch-geometric hence closing this issue