Skip to content

Minimum required accelerate library is not compatible #31433

@danielnelson

Description

@danielnelson

System Info

  • transformers version: 4.41.2
  • Platform: Linux-6.6.13-gentoo-x86_64-AMD_Ryzen_7_PRO_6850U_with_Radeon_Graphics-with-glibc2.39
  • Python version: 3.12.3
  • Huggingface_hub version: 0.23.4
  • Safetensors version: 0.4.3
  • Accelerate version: 0.21.0
  • Accelerate config: not found
  • PyTorch version (GPU?): 2.3.1+cu121 (False)
  • Tensorflow version (GPU?): not installed (NA)
  • Flax version (CPU?/GPU?/TPU?): not installed (NA)
  • Jax version: not installed
  • JaxLib version: not installed
  • Using GPU in script?:
  • Using distributed or parallel set-up in script?: NA

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

  • pip install accelerate==0.21.0
  • pip install transformers
  • pip install setuptools
  • python
    [+]>>> from transformers import Trainer
    [+]>>> Trainer()
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/home/dbn/src/rockfish/tmp/venv/lib/python3.12/site-packages/transformers/trainer.py", line 402, in __init__
        self.create_accelerator_and_postprocess()
      File "/home/dbn/src/rockfish/tmp/venv/lib/python3.12/site-packages/transformers/trainer.py", line 4535, in create_accelerator_and_postprocess
        self.accelerator = Accelerator(**args)
                           ^^^^^^^^^^^^^^^^^^^
    TypeError: Accelerator.__init__() got an unexpected keyword argument 'use_seedable_sampler'
    

Expected behavior

There should be no error unexpected keyword.

The requirement in setup.py for accelerate is set to >=0.21.0, but it seems that it needs to be at least 0.26.0.

This issue is mentioned in #29216 #28111

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions