I have recently got the error “NameError: name ‘PartialState’ is not defined”
when calling TrainingArguments() (when treating the course fine-tuning a model with
Before getting this error I had already got the error “ImportError: Using the
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.
Installing a different version of transformers helped me:
!pip install datasets transformers==4.28.0
Thanks @TestDvKrUA. That solved it for me too. A note for others. If it doesn’t catch your eye at first, there may be a message letting you know that you need to restart the runtime for it to take effect.
WARNING: The following packages were previously imported in this runtime:
You must restart the runtime in order to use newly installed versions.
!pip install -U accelerate transformers
And restart the kernel it works for me!