snap-stanford / deepsnap

Python library assists deep learning on graphs
https://snap.stanford.edu/deepsnap/
MIT License
542 stars 57 forks source link

Running node_classification_acm.py throws an error #30

Closed yk287 closed 3 years ago

yk287 commented 3 years ago

Built from source using

$ git clone https://github.com/snap-stanford/deepsnap $ cd deepsnap $ pip install .

but running

python3 node_classification_acm.py

throws the following error

Traceback (most recent call last): File "node_classification_acm.py", line 278, in <module> loss = train(model, optimizer, hetero_graph, train_idx) File "node_classification_acm.py", line 182, in train preds = model(hetero_graph.node_feature, hetero_graph.edge_index) File "/home/youngwook/anaconda3/envs/torch_graphs/lib/python3.8/site-packages/torch/nn/modules/module.py", line 889, in _call_impl result = self.forward(*input, **kwargs) File "node_classification_acm.py", line 163, in forward x = forward_op(x, self.bns1) File "/home/youngwook/anaconda3/envs/torch_graphs/lib/python3.8/site-packages/deepsnap/hetero_gnn.py", line 245, in forward_op res[key] = module_dict(x[key], **kwargs) File "/home/youngwook/anaconda3/envs/torch_graphs/lib/python3.8/site-packages/torch/nn/modules/module.py", line 889, in _call_impl result = self.forward(*input, **kwargs) TypeError: forward() takes 1 positional argument but 2 were given

Not sure if these info are relevant but

`deepsnap.version '0.2.0' torch_geometric.version '1.7.2'

`

zechengz commented 3 years ago

Hi, thanks for pointing out this! I just pushed the fix. Please let me know whether this fix works.

yk287 commented 3 years ago

Everything seems to work fine now.

Thanks!