harryshomer / quad Goto Github PK
View Code? Open in Web Editor NEWImplementation of the ASONAM'23 paper "Learning Representations for Hyper-Relational Knowledge Graphs"
Implementation of the ASONAM'23 paper "Learning Representations for Hyper-Relational Knowledge Graphs"
Hi, thanks for the code.
I tried to run the code, but some libraries are crashing.
Could you specify the version you used to run the code?
Thanks in advance
File "src/run.py", line 272, in
main()
File "src/run.py", line 267, in main
training_loop_gcn(**args)
File "/work/zhiweihu/reproduce-code/new_try/QUAD-master/src/loops/loops.py", line 89, in training_loop_gcn
obj_preds, aux_preds = model(_sub, _rel, _quals, aux_ent=aux_ent_dict)
File "/home/hzw/.conda/envs/cole/lib/python3.7/site-packages/torch/nn/modules/module.py", line 889, in _call_impl
result = self.forward(*input, **kwargs)
File "/work/zhiweihu/reproduce-code/new_try/QUAD-master/src/models/hyper_gcn.py", line 124, in forward
s_emb, r_emb, qe_emb, qr_emb, o_emb = self.index_embs_aux(x, r, aux_ent['base_sub_ix'], aux_ent['base_rel_ix'], aux_ent['base_obj_ix'], aux_ent['quals'])
ValueError: not enough values to unpack (expected 5, got 2)
when I run the script:
python src/run.py wd50k_100 --clean-data --alpha .6 --aux-ent --aux-weight 1
--qual-layers 1 --encoder-drop1 .2 --encoder-drop2 .2
--batch-size 256 --trans-dim 768 --mask --label-smooth 0.1
--aux-ent-smooth 0.1 --parallel --parallel-drop .3 --device cuda:5
Traceback (most recent call last):
File "src/run.py", line 272, in
main()
File "src/run.py", line 267, in main
training_loop_gcn(**args)
File "/home/lnh/code/QUAD/src/loops/loops.py", line 89, in training_loop_gcn
obj_preds, aux_preds = model(_sub, _rel, _quals, aux_ent=aux_ent_dict)
File "/home/lnh/.conda/envs/QUD/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
File "/home/lnh/code/QUAD/src/models/hyper_gcn.py", line 108, in forward
x1, r1 = self.trip_encoder("trip", init_ent, init_rel)
File "/home/lnh/.conda/envs/QUD/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
File "/home/lnh/code/QUAD/src/models/encoders.py", line 57, in forward
x, r = self.conv1(
File "/home/lnh/.conda/envs/QUD/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl
return forward_call(*input, **kwargs)
File "/home/lnh/code/QUAD/src/models/gnn_layer.py", line 155, in forward
loop_res = self.propagate(
TypeError: propagate() missing 6 required positional arguments: 'ent_embed', 'qualifier_ent', 'qualifier_rel', 'qual_index', 'trip_obj_ix', and 'trip_rel_ix'
when I run python src/run.py jf17k --alpha .8 --aux-ent --aux-weight .25 --qual-layers 2 --encoder-drop1 .1 --encoder-drop2 .1
--trans-dim 768 --lr-decay --lr-lambda .999 --mask --label-smooth 0.6
--aux-ent-smooth 0.6 --device cuda
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.