acbull / pyHGT

Code for "Heterogeneous Graph Transformer" (WWW'20), which is based on pytorch_geometric
MIT License
775 stars 162 forks source link

RUN-ERROR: got an unexpected keyword argument 'node_dim' #32

Open jm-huang opened 3 years ago

jm-huang commented 3 years ago

comment:

python3 train_paper_field.py --data_dir dataset --model_dir PATH_OF_SAVED_MODEL --conv_name hgt --domain _NN

result:

Traceback (most recent call last): File "train_paper_field.py", line 192, in num_types = len(graph.get_types()), num_relations = len(graph.get_meta_graph()) + 1).to(device) File "pyHGT-master/OAG/pyHGT/model.py", line 66, in init self.gcs.append(GeneralConv(conv_name, n_hid, n_hid, num_types, num_relations, n_heads, dropout, use_norm = prev_norm, use_RTE = use_RTE)) File "pyHGT-master/OAG/pyHGT/conv.py", line 308, in init self.base_conv = HGTConv(in_hid, out_hid, num_types, num_relations, n_heads, dropout, use_norm, use_RTE) File "pyHGT-master/OAG/pyHGT/conv.py", line 13, in init super(HGTConv, self).init(node_dim=0, aggr='add', **kwargs) TypeError: init() got an unexpected keyword argument 'node_dim'

How can I fixed it ?

acbull commented 3 years ago

Hi, can I know which PyG version you are using?

I add this node_dim to solve another issue that occur in latest pyG. You can simply try delete the node_dim = 0 to see whether it works, or I highly recommend you use the latest pyG.