Repository: snap-stanford/ogb
Issue: assert self.lin_edge is not None
Root cause: External Dependency Breakage

Trying to run:
python rgnn.py --device=0 --model=rgat

I'm getting an error in sanity check:

```
Namespace(batch_size=1024, device='0', dropout=0.5, epochs=100, evaluate=False, hidden_channels=1024, in_memory=False, model='rgat', sizes=[25, 15])
Global seed set to 42
#Params 12255385
GPU available: False, used: False
TPU available: False, using: 0 TPU cores
IPU available: False, using: 0 IPUs
HPU available: False, using: 0 HPUs
Missing logger folder: logs/rgat/lightning_logs
Reading dataset... Done! [22.89s]

  | Name      | Type       | Params
-----------------------------------------
0 | convs     | ModuleList | 9.2 M
1 | norms     | ModuleList | 4.1 K
2 | skips     | ModuleList | 1.8 M
3 | mlp       | Sequential | 1.2 M
4 | train_acc | Accuracy   | 0
5 | val_acc   | Accuracy   | 0
6 | test_acc  | Accuracy   | 0
-----------------------------------------
12.3 M    Trainable params
0         Non-trainable params
12.3 M    Total params
49.022    Total estimated model params size (MB)
Sanity Checking: 0it [00:00, ?it/s]/nfs/iil/proj/mpg/amitblei_wa.1/moti-work/ogb/venv/lib/python3.8/site-packages/torch_geometric/deprecation.py:12: UserWarning: 'data.NeighborSampler' is deprecated, use 'loader.NeighborSampler' instead
  warnings.warn(out)
/nfs/iil/proj/mpg/amitblei_wa.1/moti-work/ogb/venv/lib/python3.8/site-packages/pytorch_lightning/trainer/connectors/data_connector.py:240: PossibleUserWarning: The dataloader, val_dataloader 0, does not have many workers which may be a bottleneck. Consider increasing the value of the `num_workers` argument` (try 36 which is the number of cpus on this machine) in the `DataLoader` init to improve performance.
  rank_zero_warn(


Sanity Checking DataLoader 0:   0%|                                                                           | 0/2 [00:38<?, ?it/s]Traceback (most recent call last):
  File "rgnn.py", line 423, in <module>
    trainer.fit(model, datamodule=datamodule)
  File "/nfs/iil/proj/mpg/amitblei_wa.1/moti-work/ogb/venv/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 771, in fit
    self._call_and_handle_interrupt(
  File "/nfs/iil/proj/mpg/amitblei_wa.1/moti-work/ogb/venv/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 724, in _call_and_handle_interrupt
    return trainer_fn(*args, **kwargs)
  File "/nfs/iil/proj/mpg/amitblei_wa.1/moti-work/ogb/venv/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 812, in _fit_impl
    results = self._run(model, ckpt_path=self.ckpt_path)
  File "/nfs/iil/proj/mpg/amitblei_wa.1/moti-work/ogb/venv/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 1237, in _run
    results = self._run_stage()
  File "/nfs/iil/proj/mpg/amitblei_wa.1/moti-work/ogb/venv/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 1324, in _run_stage
    return self._run_train()
  File "/nfs/iil/proj/mpg/amitblei_wa.1/moti-work/ogb/venv/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 1346, in _run_train
    self._run_sanity_check()
  File "/nfs/iil/proj/mpg/amitblei_wa.1/moti-work/ogb/venv/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 1414, in _run_sanity_check
    val_loop.run()
  File "/nfs/iil/proj/mpg/amitblei_wa.1/moti-work/ogb/venv/lib/python3.8/site-packages/pytorch_lightning/loops/base.py", line 204, in run
    self.advance(*args, **kwargs)
  File "/nfs/iil/proj/mpg/amitblei_wa.1/moti-work/ogb/venv/lib/python3.8/site-packages/pytorch_lightning/loops/dataloader/evaluation_loop.py", line 153, in advance
    dl_outputs = self.epoch_loop.run(self._data_fetcher, dl_max_batches, kwargs)
  File "/nfs/iil/proj/mpg/amitblei_wa.1/moti-work/ogb/venv/lib/python3.8/site-packages/pytorch_lightning/loops/base.py", line 204, in run
    self.advance(*args, **kwargs)
  File "/nfs/iil/proj/mpg/amitblei_wa.1/moti-work/ogb/venv/lib/python3.8/site-packages/pytorch_lightning/loops/epoch/evaluation_epoch_loop.py", line 127, in advance
    output = self._evaluation_step(**kwargs)
  File "/nfs/iil/proj/mpg/amitblei_wa.1/moti-work/ogb/venv/lib/python3.8/site-packages/pytorch_lightning/loops/epoch/evaluation_epoch_loop.py", line 222, in _evaluation_step
    output = self.trainer._call_strategy_hook("validation_step", *kwargs.values())
  File "/nfs/iil/proj/mpg/amitblei_wa.1/moti-work/ogb/venv/lib/python3.8/site-packages/pytorch_lightning/trainer/trainer.py", line 1766, in _call_strategy_hook
    output = fn(*args, **kwargs)
  File "/nfs/iil/proj/mpg/amitblei_wa.1/moti-work/ogb/venv/lib/python3.8/site-packages/pytorch_lightning/strategies/strategy.py", line 344, in validation_step
    return self.model.validation_step(*args, **kwargs)
  File "rgnn.py", line 377, in validation_step
    y_hat = self(batch.x, batch.adjs_t)
  File "/nfs/iil/proj/mpg/amitblei_wa.1/moti-work/ogb/venv/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
    return forward_call(*input, **kwargs)
  File "rgnn.py", line 360, in forward
    out += self.convs[i][j]((x, x_target), subadj_t)
  File "/nfs/iil/proj/mpg/amitblei_wa.1/moti-work/ogb/venv/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
    return forward_call(*input, **kwargs)
  File "/nfs/iil/proj/mpg/amitblei_wa.1/moti-work/ogb/venv/lib/python3.8/site-packages/torch_geometric/nn/conv/gat_conv.py", line 243, in forward
    alpha = self.edge_updater(edge_index, alpha=alpha, edge_attr=edge_attr)
  File "/nfs/iil/proj/mpg/amitblei_wa.1/moti-work/ogb/venv/lib/python3.8/site-packages/torch_geometric/nn/conv/message_passing.py", line 415, in edge_updater
    out = self.edge_update(**edge_kwargs)
  File "/nfs/iil/proj/mpg/amitblei_wa.1/moti-work/ogb/venv/lib/python3.8/site-packages/torch_geometric/nn/conv/gat_conv.py", line 274, in edge_update
    assert self.lin_edge is not None
AssertionError

```

Thanks for reporting. I am currently on vacation and will look into this in the upcoming week. For now, I suggest to downgrade to PyG 1.7.2 since this is the version we used ourselves for benchmarking purposes of this script. Let me know if this helps!

I used torch_geometric 2.0.5, downgrading to 1.7.2, solved the issue

Fixed in https://github.com/snap-stanford/ogb/commit/f83d9724112c06ce230cbffa57202155b2c7a06c.