Closed yuvalkirstain closed 2 years ago
The problem is with the validation sanity check; the evaluation stage assumes that all of the predictions are gathered (assert len(predictions[0]) == len(features)
on squad/processing
). Until this is properly handled one can run the script by adding: trainer.num_sanity_val_steps=0
:
python train.py task=nlp/question_answering dataset=nlp/question_answering/squad trainer.num_sanity_val_steps=0
Note that there are other use-cases that will fail, like using multiple GPUs (again, it will fail at the evaluation stage).
This issue was also raised in #184 My solution to it should also work here. There should be a way to make -1
the default number in the yaml file used by hydra.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
🐛 Bug
running the basic example
python train.py task=nlp/question_answering dataset=nlp/question_answering/squad trainer.gpus=1
gets an exception.To Reproduce
Steps to reproduce the behavior:
python train.py task=nlp/question_answering dataset=nlp/question_answering/squad trainer.gpus=1
.Environment
conda
,pip
, source): pip