Closed sadanyh closed 3 years ago
Please post the full error stacktrace. Which version of the script are you using?
Hi thank you for your reply. I did post the trace back for the error.
Looking forward to your reply
Hadeel
On 21 Feb 2021, at 10:01 am, cronoik notifications@github.com wrote:
Please post the full error stacktrace. Which version of the script are you using?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Please use the forums to debug custom code with help from the community and only when you have isolated a part that is a bug in the library use a GitHub issue.
In this particular case, you should include the full stack trace, as pointed out before (it's not in your message, just the last frame) and the code that created your model: the error seems to point out that it only returns one value when you need two (since you write loss, logits = model(...)
). You should debug that by looking at the model return on one batch.
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: 3.0.2Who can help
albert, bert, xlm: @LysandreJik trainer: @sgugger
Information
Model I am using (XLMRobertaForSequenceClassification):
The problem arises when using:
The tasks I am working on is:
To reproduce
This training code is based on the
run_glue.py
script here:https://github.com/huggingface/transformers/blob/5bfcd0485ece086ebcbed2d008813037968a9e58/examples/run_glue.py#L128
for epoch_i in range(0, epochs):
print("") print("Training complete!")
print("Total training took {:} (h:mm:ss)".format(format_time(time.time()-total_t0)))
Expected behavior
THE ERROR: ======== Epoch 1 / 4 ======== Training...
ValueError Traceback (most recent call last)