Describe the bug
Importing ClassificationModel from simpletransformers.classification raises the following issue:
ImportError: cannot import name 'ROBERTA_PRETRAINED_MODEL_ARCHIVE_MAP' from 'transformers.modeling_roberta'
To Reproduce
from simpletransformers.classification import ClassificationModel
Expected behavior
Desktop (please complete the following information):
Additional context
I'm having the same issue when running from google colab
I'm getting it in both Google Colab and Jupyter notebook.
This is because of the breaking changes in the latest transformers version. Please use transformers==2.10.0 until this is fixed.
How can i use transforemers 2.10.00 with simpletransformers ???
This is because of the breaking changes in the latest transformers version. Please use
transformers==2.10.0until this is fixed.
pip install transformers==2.10.0
transformers v2.11.0 should be compatible with simple transformers v0.32.3
Compatibility issues resolved.
Hi Sir,
I am still getting this error on google colab.
/content/drive/My Drive/task_detector/simpletransformers-master/simpletransformers/classification/transformer_models/roberta_model.py in
----> 1 from transformers.modeling_roberta import RobertaConfig, RobertaModel, RobertaClassificationHead, ROBERTA_PRETRAINED_MODEL_ARCHIVE_MAP, BertPreTrainedModel
2 import torch
3 import torch.nn as nn
4 from torch.nn import CrossEntropyLoss, MSELoss
ImportError: cannot import name 'ROBERTA_PRETRAINED_MODEL_ARCHIVE_MAP'
I had tried installing versions mentioned:
!pip install simpletransformers==0.32.3
!pip install transformers==2.11.0
But the error is still persisting.
Could you help me out with this, please?
Thanks,
Radha
This is quite old now. You can use the latest versions of both transformers and simpletransformers.
pip install --upgrade simpletransformers
Thank you so much. That worked.
Get Outlook for iOShttps://aka.ms/o0ukef
From: Thilina Rajapakse notifications@github.com
Sent: Tuesday, July 28, 2020 12:16:52 AM
To: ThilinaRajapakse/simpletransformers simpletransformers@noreply.github.com
Cc: Radha Vinod radha_vinod@sutd.edu.sg; Comment comment@noreply.github.com
Subject: Re: [ThilinaRajapakse/simpletransformers] ImportError relating 'ROBERTA_PRETRAINED_MODEL_ARCHIVE_MAP' (#446)
This is quite old now. You can use the latest versions of both transformers and simpletransformers.
pip install --upgrade simpletransformers
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHubhttps://github.com/ThilinaRajapakse/simpletransformers/issues/446#issuecomment-664573040, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AOBTVKFDJWVGBUNDUT7N5CTR5XDRZANCNFSM4NQ5NYSQ.
Most helpful comment
This is because of the breaking changes in the latest transformers version. Please use
transformers==2.10.0until this is fixed.