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 on TPU : KeyError '__getstate__' #4327
Comments
As a temporary work-around, I made the from transformers.tokenization_utils import BatchEncoding
def red(self):
return BatchEncoding, (self.data, )
BatchEncoding.__reduce__ = red Not closing yet, as this seems to be just a work-around and not a real solution. |
Cc @mfuntowicz |
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. |
Hi,I got same error with transformers 2.9.0, and 2.9.1 following error: Traceback (most recent call last):
|
@colanim How did you solve it? |
I think it was fixed in the latest version of If you need to work with an older version of
|
Indeed, this should have been fixed in the versions |
🐛 Bug
Information
Model I am using : ELECTRA base
Language I am using the model on : English
The problem arises when using:
The tasks I am working on is:
To reproduce
I'm trying to fine-tune a model on Colab TPU, using the new Trainer API. But I'm struggling.
Here is a self-contained Colab notebook to reproduce the error (it's a dummy example).
When running the notebook, I get the following error :
Full stack trace :
Any hint on how to make this dummy example work is welcomed.
Environment info
transformers
version: 2.9.0@jysohn23 @julien-c
The text was updated successfully, but these errors were encountered: