Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: Accelerator.__init__() got an unexpected keyword argument 'dispatch_batches' #34714

Open
2 of 4 tasks
SiyuWu528 opened this issue Nov 13, 2024 · 2 comments
Open
2 of 4 tasks
Labels

Comments

@SiyuWu528
Copy link

System Info

transformers==4.37.2 python 3

Who can help?

No response

Information

  • The official example scripts
  • My own modified scripts

Tasks

  • An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
  • My own task or dataset (give details below)

Reproduction

#huggingface trainer, to train the model
from transformers import Trainer, TrainingArguments

model.to(device)
model_name = f"{model_ckpt}-finetuned"
batch_size = 2
training_args = TrainingArguments(
output_dir= model_name,
save_safetensors = False,
per_device_train_batch_size=batch_size,
per_device_eval_batch_size=batch_size,
evaluation_strategy='epoch',
logging_strategy='epoch',
learning_rate=1e-5,
num_train_epochs=10,
weight_decay=0.01,
gradient_accumulation_steps=2,
max_grad_norm=1.0,
optim='adamw_torch'
)

trainer = Trainer(
model= model,
args=training_args,
train_dataset=train_dataset,
eval_dataset=test_dataset,
compute_metrics=compute_metrics

)

trainer.train()

Expected behavior

I was run perfectly fun before Nov 12th midnight, and stop working on Nov 13th.....

@SiyuWu528 SiyuWu528 added the bug label Nov 13, 2024
@PrettyBoyHelios
Copy link

same here, trying to figure out what hapened

@andresmijares
Copy link

andresmijares commented Nov 13, 2024

same...

I can confirm that downgrading to 0.28.0 still works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants