Trainer.__init__() got an unexpected keyword argument 'model'
I followed theseinstructions for fine-tuning model, and everything works nicely since I got these problems. I am using Google Colab for fine-tuning.It’s strange since the Trainer can not recognize the model. I have already tried using BertForSequenceClassification and AutoModelForSequenceClassification but the results are the same.image743×109 5.25 KBIs there any way to fix this?By the way, I install libraries following the above link.
2023-05-29T07:04:36Z
The problem is solved. Indeed, I used Pytorch Lightning and HuggingFace in parallel. It may be some conflicts between Trainer of hugging-face and pytorch_lightning. After I’ve removed libraries related to pytorch_lightning, the code runs smoothly.