-
Notifications
You must be signed in to change notification settings - Fork 25.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trainer evaluation doesn't return eval loss for question-answering. #5104
Comments
I solved it editing trainer.py, in this line https://github.com/huggingface/transformers/blob/master/src/transformers/trainer.py#L765 . I added start_positions and end_positions to that "possible labels names" list, and it worked. Review the bug, please. |
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. |
I am having the same issue. Can you elaborate on how you solved this problem? I could not locate a possible label list and start/end positions? |
#7191 should solve the problem described here. |
@sgugger How can we calculate validation and evaluation loss for question answering finetuning pipeline (run_qa.py) |
As mentioned in this issue:
"""
Just a note that I tried
python run_squad_trainer.py --model_name_or_path bert-base-uncased --model_type bert --data_dir squad --output_dir /tmp/debug_squad/ --overwrite_output_dir --do_train --do_eval --evaluate_during_training --logging_steps 100
.For some reason I don't get any evaluation metric during training (I was expecting
loss
oreval_loss
).Originally posted by @borisdayma in #4829 (comment)
"""
I'm facing the same problem. I'm trying to train with Trainer class over a QA dataset different from SQUAD. Everything works fine, the model learns based on train loss. However, I haven't been able to get the eval loss. I hope these pieces of code show how I'm configuring Trainer. Can somebody tell me if I'm doing something wrong?
I also tried without EvalPrediction in compute_metrics.
Thanks in advance !
The text was updated successfully, but these errors were encountered: