In Colab, the part I gave below gives errors in all codes. Please can you help?
training_args = TrainingArguments(output_dir=“my_awesome_food_model”,remove_unused_columns=False,evaluation_strategy=“epoch”,save_strategy=“epoch”,learning_rate=5e-5,per_device_train_batch_size=16,gradient_accumulation_steps=4,per_device_eval_batch_size=16,num_train_epochs=3,warmup_ratio=0.1,logging_steps=10,load_best_model_at_end=True,metric_for_best_model=“accuracy”,push_to_hub=True,)
2023-12-28T02:58:28Z
Please share the error message?
2023-12-28T03:12:00Z
ImportError                               Traceback (most recent call last)in <cell line: 3>()1 from transformers import TrainingArguments2----> 3 training_args = TrainingArguments(4   output_dir=“./cifar”,5   per_device_train_batch_size=16,4 frames/usr/local/lib/python3.10/dist-packages/transformers/training_args.py in _setup_devices(self)1785         if not is_sagemaker_mp_enabled():1786             if not is_accelerate_available(min_version=“0.20.1”):→ 1787                 raise ImportError(1788                     “Using theTrainerwithPyTorchrequiresaccelerate>=0.20.1: Please runpip install transformers[torch]orpip install accelerate -U”1789                 )ImportError: Using theTrainerwithPyTorchrequiresaccelerate>=0.20.1: Please runpip install transformers[torch]orpip install accelerate -UNOTE: If your import is failing due to a missing package, you canmanually install dependencies using either !pip or !apt.To view examples of installing some common dependencies, click the“Open Examples” button below.Even though I try the things I wrote below, it gives an error.ImportError: Using theTrainerwithPyTorchrequiresaccelerate>=0.20.1: Please runpip install transformers[torch]orpip install accelerate -U
2023-12-28T15:31:31Z
What runtime are you using?You can check by going to:Runtime > Change runtime type
2023-12-29T21:40:38Z
i got the same error while fine tuning gpt2 for a QnA dataset.Traintrain(train_file_path=train_file_path,model_name=model_name,output_dir=output_dir,overwrite_output_dir=overwrite_output_dir,per_device_train_batch_size=per_device_train_batch_size,num_train_epochs=num_train_epochs,save_steps=save_steps)when I run this part,it gives the same error, and I ran the given commands accelerate>=0.20.1 etc but still got the same error.