Importing TrainingArguments gives error
My code is:from transformers import TrainingArgumentstraining_args = TrainingArguments(“test-trainer”)I get error:ImportError: Using theTrainerwithPyTorchrequiresaccelerate>=0.20.1: Please runpip install transformers[torch]orpip install accelerate -UI have installed both libraries, but I still get the same error.
2023-08-07T13:11:11Z
tayyibsupercool:I have installed both libraries, but I still get the same error.Isaccelerate> 0.20.1? And if so, and if you are in colab, please ensure you do Runtime → Restart Runtime. This is a very common error
2023-08-07T16:44:07Z
Yes, restarting worked for me, thanks