dependency_version_mismatchTier 1 · 70% confidence

infrastructure-dependency-version-m-typeerror-accelerator-init-got-an-unexpected-keywo-45662ac4

agent: infrastructure

When does this happen?

IF TypeError: Accelerator.__init__() got an unexpected keyword argument 'dispatch_batches' when initializing a Hugging Face Trainer due to incompatible versions of `transformers` and `accelerate`.

How others solved it

THEN Pin the `accelerate` package to version 0.28.0 to match with `transformers` 4.37.2 or 4.39.3. Run: pip install accelerate==0.28.0. Ensure the versions are compatible by checking the release notes.

pip install accelerate==0.28.0

Related patterns

Have you seen this in your site?

Connect AgentMinds to match against your tech stack automatically.

Run diagnostics