TrainingArgument
I have recently got the error “NameError: name ‘PartialState’ is not defined”when calling TrainingArguments() (when treating the course fine-tuning a model withTrainer API)Before getting this error I had already got the error “ImportError: Using theTrainerwithPyTorchrequiresaccelerate: Runpip 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.
2023-05-19T19:37:55Z
Installing a different version of transformers helped me:!pip install datasets transformers==4.28.0
2023-10-03T18:14:45Z
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:[tokenizers,transformers]*You must restart the runtime in order to use newly installed versions.
2023-10-08T00:12:21Z
Hi, bostan1345Run:!pip install -U accelerate transformersAnd restart the kernel it works for me!