Error in Lab_2 at 2.2

In Lab_2 at 2.2 I get an error:

TypeError Traceback (most recent call last)
Cell In[10], line 12
1 output_dir = f’./dialogue-summary-training-{str(int(time.time()))}’
3 training_args = TrainingArguments(
4 output_dir=output_dir,
5 learning_rate=1e-5,
(…)
9 max_steps=1
10 )
—> 12 trainer = Trainer(
13 model=original_model,
14 args=training_args,
15 train_dataset=tokenized_datasets[‘train’],
16 eval_dataset=tokenized_datasets[‘validation’]
17 )

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

1 Like

Hello,

Please check this thread

1 Like

I think the transformer and accelerator versions on the Lab are right!

Did you run the first cell:

First upgrade pip

%pip install --upgrade pip

Install tensorflow and keras first

%pip install tensorflow==2.18.0 keras==3.9.0

Install torch and torchdata

%pip install --no-deps torch==2.5.1 torchdata==0.6.0 --quiet

Then install other packages except TRL

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

Try to restart the kernel after running this cell!