KiddoZhu / NBFNet-PyG

PyG re-implementation of Neural Bellman-Ford Networks (NeurIPS 2021)
MIT License
59 stars 13 forks source link

AttributeError: 'GeneralizedRelationalConv' object has no attribute '__check_input__' #8

Closed ralgond closed 1 year ago

ralgond commented 1 year ago

I run the commond:

python script/run.py -c config/inductive/wn18rr.yaml --gpus [0] --version v1

and encounted the error, details is:

Traceback (most recent call last): File "script/run.py", line 216, in train_and_validate(cfg, model, train_data, valid_data, filtered_data=filtered_data) File "script/run.py", line 57, in train_and_validate pred = parallel_model(train_data, batch) File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl return forward_call(*input, *kwargs) File "/root/NBFNet-PyG/nbfnet/models.py", line 139, in forward output = self.bellmanford(data, h_index[:, 0], r_index[:, 0]) # (num_nodes, batch_size, feature_dim) File "/root/NBFNet-PyG/nbfnet/models.py", line 104, in bellmanford hidden = layer(layer_input, query, boundary, data.edge_index, data.edge_type, size, edge_weight) File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl return forward_call(input, **kwargs) File "/root/NBFNet-PyG/nbfnet/layers.py", line 65, in forward output = self.propagate(input=input, relation=relation, boundary=boundary, edge_index=edge_index, File "/root/NBFNet-PyG/nbfnet/layers.py", line 80, in propagate size = self.check_input__(edge_index, size) File "/root/miniconda3/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1185, in getattr raise AttributeError("'{}' object has no attribute '{}'".format( AttributeError: 'GeneralizedRelationalConv' object has no attribute 'check_input__'

ralgond commented 1 year ago

reinstall pyg with version 2.0.0 solves this problem.