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
Models can't be loaded after updating to Python 3.10 #20156
Comments
Thanks a lot for this issue! The issue seems to be coming from an external dependency sentencepiece which is using protobuf . Can you share with us the versions of the following packages please 🙏 ? For example with:
|
Yes of course. These are the versions:
|
I can't have an env with python 3.10.8 right now, but the first thing I would want to try is to upgrade protobuf to its latest version which is |
I installed version
Downgrading |
None of these things worked for me. In my case, I could downgrade Python to 3.9 version, without causing any other issue in my code. Note that this issue only happened to me with the Pytorch backend. Tensforflow models worked fine. |
System Info
transformers
version: 4.24.0Who can help?
@SaulLu
Information
Tasks
examples
folder (such as GLUE/SQuAD, ...)Reproduction
I updated Python to version
3.10.8
. Note that I use JupyterLab.I had to re-install a lot of packages (not
transformers
is4.24.0
). At first, I got an error message that the fast tokenizer couldn't be loaded (sorry to be this vague, I didn't track it), so I updated some packages.Now I get an error when I try to load the tokenizer of this model, and I am not able to overcome it.
Steps to reproduce the behavior:
I tried several solutions (this and this) but none seem to work.
Here they suggest I should change
collections.Mapping
intocollections.abc.Mapping
, but I wouldn't knwo where to do it.Another possible solution is downgrading Python to 3.9, but I would like to keep it as last resort.
Many thanks for your help
Expected behavior
Tokenizer should be loaded. Instead, I get this error:
The text was updated successfully, but these errors were encountered: