You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sorry, I met the same problem. It's that when I do a valid_step after starting the training, it returns an error.
Traceback (most recent call last):
File "ddi_zoo/src/train.py", line 507, in <module>
cli_main()
File "ddi_zoo/src/train.py", line 500, in cli_main
distributed_utils.call_main(cfg, main)
File "/root/code/R2-DDI/fairseq/distributed/utils.py", line 369, in call_main
main(cfg, **kwargs)
File "ddi_zoo/src/train.py", line 172, in main
valid_losses, should_stop = train(cfg, trainer, task, epoch_itr)
File "/opt/conda/envs/pytorch/lib/python3.8/contextlib.py", line 75, in inner
return func(*args, **kwds)
File "ddi_zoo/src/train.py", line 296, in train
valid_losses, should_stop = validate_and_save(
File "ddi_zoo/src/train.py", line 383, in validate_and_save
valid_losses = validate(cfg, trainer, task, epoch_itr, valid_subsets)
File "ddi_zoo/src/train.py", line 453, in validate
trainer.valid_step(sample)
File "/opt/conda/envs/pytorch/lib/python3.8/contextlib.py", line 75, in inner
return func(*args, **kwds)
File "/root/code/R2-DDI/fairseq/trainer.py", line 945, in valid_step
logits = logging_output['logits']
KeyError: 'logits'
Also I would like to inquire. When I use docker, I git down a fairseq, and after I manipulate that fairseq, my pip environment says that my fairseq points to /root/code/fairseq, but in /root/code/R2-DDI (i.e., our project), there is also a fairseq that when I use python setup.py build_ext --inplace and then I execute the training bash ddi_zoo/scripts/train_trans/run_gcn_feat_int_cons.sh new_build2 0.01 1e-4 256, the error reported in the fairseq is instead calling the class in /root/code/R2-DDI/fairseq. I would like to ask if the target in our project calls /root/code/R2-DDI/fairseq or /root/code/fairseq.
The text was updated successfully, but these errors were encountered:
I solved the problem by realizing that the logits and labels in lines 945, 936 in the trainer.py file in fairseq are not used, I just commented them out and removed them in the return value.
Sorry, I met the same problem. It's that when I do a
valid_step
after starting the training, it returns an error.Also I would like to inquire. When I use docker, I git down a fairseq, and after I manipulate that fairseq, my pip environment says that my fairseq points to
/root/code/fairseq
, but in/root/code/R2-DDI
(i.e., our project), there is also a fairseq that when I usepython setup.py build_ext --inplace
and then I execute the trainingbash ddi_zoo/scripts/train_trans/run_gcn_feat_int_cons.sh new_build2 0.01 1e-4 256
, the error reported in the fairseq is instead calling the class in/root/code/R2-DDI/fairseq
. I would like to ask if the target in our project calls/root/code/R2-DDI/fairseq
or/root/code/fairseq
.The text was updated successfully, but these errors were encountered: