-
Notifications
You must be signed in to change notification settings - Fork 25.3k
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
Seq2SeqTrainer.evaluation_loop requires labels
due to DataCollatorForSeq2Seq
#14833
Comments
Good catch! The |
I would have opened a PR, but there seem to have more in it. Modifying
Looking at the full stack trace it seems that something in the logic of |
O.K, I've caught what I was doing wrong - as the docs say,
So for T5 models, I need to have some dummy |
This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread. Please note that issues that do not follow the contributing guidelines are likely to be ignored. |
Environment info
transformers
version: 4.11.0.dev0Platform: Linux-3.10.0-1160.49.1.el7.x86_64-x86_64-with-glibc2.17
Python version: 3.8.11
PyTorch version (GPU?): 1.9.0+cu102 (True)
Tensorflow version (GPU?): not installed (NA)
Flax version (CPU?/GPU?/TPU?): not installed (NA)
Jax version: not installed
JaxLib version: not installed
Using GPU in script?: yes
Using distributed or parallel set-up in script?: yes
transformers
version: 4.11.0.dev0Platform: CentOS 7
Python version: 3.8.11
PyTorch version (GPU?): 1.9.0+cu102
Tensorflow version (GPU?):
Using GPU in script?:
Using distributed or parallel set-up in script?:
Who can help
@affjljoo3581
@patrickvonplaten
Information
I'm trying to run inference with a fine-tuned T5 model. I'm using the
run_summarization
script with some editions, and the problem occurs when thepredict_dataset
doesn't havelabels
(prediction time). the__call__
function on the DataCollatorForSeq2Seq object fails ("KeyError") because it expects the datasets to have alabels
key:Model I am using (Bert, XLNet ...): T5 and BART
The problem arises when using:
The tasks I am working on is:
Expected behavior
I should be able to run the script on prediction (
--do_predict
) without providing labels in the dataset.The text was updated successfully, but these errors were encountered: