TrainingArgument

I have recently got the error ā€œNameError: name ā€˜PartialStateā€™ is not definedā€
when calling TrainingArguments() (when treating the course fine-tuning a model with
Trainer API)
Before getting this error I had already got the error ā€œImportError: Using the Trainer with PyTorch requires accelerate: Run pip install --upgrade accelerateā€
so I installed and import accelerate but after that I got the former error of 'PartialState"

I should remind I didnā€™t get those errors two weeks ago when I tested the code for the first time. Please kindly inform me what I should do now.

2 Likes

Installing a different version of transformers helped me: !pip install datasets transformers==4.28.0