Error Importing Seq2SeqTrainer

I’m new to using transformers so any help would be appreciated. I keep getting this error when I attempting to import Seq2Seq2Trainer and Seq2Seq2TrainingArguments:

ImportError: cannot import name ‘TFPreTrainedModel’ from ‘transformers’

I’m not sure what to do to resolve this, I’ve already checked to make sure that transformers is up to date (version 4.56.0).

1 Like

I was able to figure out the issue. It was caused by having both TensorFlow and pyTorch installed. When both are installed, Integration_utils.py first checks to see if TensorFlow is available first and the attempts to import TFPreTrainedModel this is where the error was occurring.

1 Like

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.