-
Notifications
You must be signed in to change notification settings - Fork 727
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
ModuleNotFoundError: No module named 'transformers.models.mmbt' #1539
Comments
I am also having this same problem with similar steps to reproduce.
This results in:
I am also using Colab and had no issues two days ago. |
Until this is fixed, the following workaround can be used (see issue #1538): !pip install simpletransformers "transformers==4.30.2" |
This is work for me. Thanks ! |
Same here. |
I can't seem to recreate the error, despite saving and loading a number of roberta based models. It's possible that there's something about the particular model being loaded that simple transformers or scipy isn't getting on with. I notice that in the latest version of scipy (1.11.1) the default behaviour of the mode method has changed. Assuming the latest version of scipy was installed as a dependency when simple transformers was installed, maybe instead using a previous version of scipy could help. Perhaps try the following: pip install simpletransformers "transformers==4.30.2" "scipy==1.10.1" This is only a slight possibility though unfortunately. I think it's difficult to say for sure what the problem is without taking a look at your conda environment and saved model in detail. |
Installing simpletransformers with scipy1.10.1 indeed worked! Seemed like incompatibility with new scipy mode function was the issue. Thank you so much! |
Looks like the latest version of transformers is incompatible with the current Simple Transformers version. I will look into this next week. Until then, please use the workaround suggested by @owendw1 (thanks!). |
Also the upstream problem of ThilinaRajapakse/simpletransformers#1539
This should be fixed now. The latest version of Simple Transformers should be compatible with the latest Transformers (as well as Python and PyTorch) versions. |
For BERT model training in Colab, I have installed following libraries:
To Reproduce
Steps to reproduce the behavior:
import simpletransformers
from simpletransformers.classification import ClassificationModel
ModuleNotFoundError Traceback (most recent call last)
in <cell line: 1>()
----> 1 from simpletransformers.classification import ClassificationModel
1 frames
/usr/local/lib/python3.10/dist-packages/simpletransformers/classification/multi_modal_classification_model.py in
45 BertTokenizer,
46 )
---> 47 from transformers.models.mmbt.configuration_mmbt import MMBTConfig
48
49 from simpletransformers.classification.classification_utils import (
ModuleNotFoundError: No module named 'transformers.models.mmbt'
NOTE: If your import is failing due to a missing package, you can
manually install dependencies using either !pip or !apt.
To view examples of installing some common dependencies, click the
"Open Examples" button below.
Expected behavior
Previously, when I tried calling this function, it worked flawlessly, which was barely 3 days earlier.
Screenshots
The text was updated successfully, but these errors were encountered: