Week2 Lab 2 : TypeError: Accelerator.__init__() got an unexpected keyword argument 'dispatch_batches'

Course: Generative AI with Large Language Models
Week2 Lab2
notebook cell:

2.2 - Fine-Tune the Model with the Preprocessed Dataset

output_dir = f’./dialogue-summary-training-{str(int(time.time()))}’

training_args = TrainingArguments(
output_dir=output_dir,
learning_rate=1e-5,
num_train_epochs=1,
weight_decay=0.01,
logging_steps=1,
max_steps=1
)

trainer = Trainer(
model=original_model,
args=training_args,
train_dataset=tokenized_datasets[‘train’],
eval_dataset=tokenized_datasets[‘validation’]
)

Error: TypeError: Accelerator.init() got an unexpected keyword argument ‘dispatch_batches’

1 Like

Added “accelerate==0.28.0” in pip install to move forward in the lab.

%pip install -U
datasets==2.17.0
accelerate==0.28.0
transformers==4.38.2
evaluate==0.4.0
rouge_score==0.1.2
peft==0.3.0 --quiet

2 Likes

Hi. Yes this issue should now be fixed. Thanks.

1 Like