Closed xiyaAZ closed 3 years ago
Traceback (most recent call last): File "/home/ktfp768/CoLAKE/pretrain/run_pretrain.py", line 266, in train() File "/home/ktfp768/CoLAKE/pretrain/run_pretrain.py", line 146, in train test_data = FewRelDevDataSet(path=args.test_data, label_vocab=rel_vocab, ent_vocab=ent_vocab) File "../pretrain/dataset.py", line 528, in init 'attention_mask': ins['adj'], KeyError: 'adj' Traceback (most recent call last): File "/opt/scp/software/Python/3.6.3-foss-2017a/lib/python3.6/runpy.py", line 193, in _run_module_as_main "main", mod_spec) File "/opt/scp/software/Python/3.6.3-foss-2017a/lib/python3.6/runpy.py", line 85, in _run_code exec(code, run_globals) File "/home/ktfp768/test/lib/python3.6/site-packages/torch/distributed/launch.py", line 260, in main() File "/home/ktfp768/test/lib/python3.6/site-packages/torch/distributed/launch.py", line 256, in main cmd=cmd) subprocess.CalledProcessError: Command '['/home/ktfp768/test/bin/python', '-u', '/home/ktfp768/CoLAKE/pretrain/run_pretrain.py', '--local_rank=0', '--name', 'CoLAKE', '--data_prop', '1.0', '--batch_size', '2048', '--lr', '1e-4', '--ent_lr', '1e-4', '--epoch', '1', '--grad_accumulation', '16', '--save_model', '--emb_name', 'entity_emb', '--n_negs', '200', '--beta', '0.98']' returned non-zero exit status 1.
已修改--test_data默认为None. 如果需要在pretrain阶段也在FewRel上测试,可以把./finetune/dataloader.py里的REGraphDataSet迁移过来替换FewRelDevDataSet.
Traceback (most recent call last): File "/home/ktfp768/CoLAKE/pretrain/run_pretrain.py", line 266, in
train()
File "/home/ktfp768/CoLAKE/pretrain/run_pretrain.py", line 146, in train
test_data = FewRelDevDataSet(path=args.test_data, label_vocab=rel_vocab, ent_vocab=ent_vocab)
File "../pretrain/dataset.py", line 528, in init
'attention_mask': ins['adj'],
KeyError: 'adj'
Traceback (most recent call last):
File "/opt/scp/software/Python/3.6.3-foss-2017a/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/opt/scp/software/Python/3.6.3-foss-2017a/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/home/ktfp768/test/lib/python3.6/site-packages/torch/distributed/launch.py", line 260, in
main()
File "/home/ktfp768/test/lib/python3.6/site-packages/torch/distributed/launch.py", line 256, in main
cmd=cmd)
subprocess.CalledProcessError: Command '['/home/ktfp768/test/bin/python', '-u', '/home/ktfp768/CoLAKE/pretrain/run_pretrain.py', '--local_rank=0', '--name', 'CoLAKE', '--data_prop', '1.0', '--batch_size', '2048', '--lr', '1e-4', '--ent_lr', '1e-4', '--epoch', '1', '--grad_accumulation', '16', '--save_model', '--emb_name', 'entity_emb', '--n_negs', '200', '--beta', '0.98']' returned non-zero exit status 1.