Minimum required accelerate library is not compatible
Author: danielnelson
Pull request: no

### 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?: <fill in>
- Using distributed or parallel set-up in script?: NA

### Who can help?

_No response_

### Information

- [ ] The official example scripts
- [X] My own modified scripts

### Tasks

- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [X] 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

Comments:
Hi @danielnelson, thanks for raising this issue! 

Indeed, we might have to update our accelerate versions cc @ydshieh 

cc @muellerzr @SunMarc When does `use_seedable_sampler` come in? 



Hi, `use_seedable_sampler` was introduced in this [PR](https://github.com/huggingface/accelerate/pull/2319#issue-2071961686), so in v0.26 of accelerate. We introduced 4 months ago AcceleratorConfig which have `use_seedable_sampler` as arg. Then we [initialize](https://github.com/huggingface/transformers/blob/ab0f050b42d903f34d6eb97f3f8c0c07f0517ad2/src/transformers/trainer.py#L4532) the accelerator based on this config, hence the issue. It should be fixed with the above PR @danielnelson, could you give it a try ? 

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md) are likely to be ignored.

Bumping for the stale bot.

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md) are likely to be ignored.

You really should reconsider your use of a bot to just close issues, maybe it would be nice to fix things instead?  Sorry to be so salty but come on.

Hi @danielnelson! Apologies for the delay in the issue being addressed. [Re this comment](https://github.com/huggingface/transformers/issues/31433#issuecomment-2173423350) - have you tried the solution in #31449 to confirm if it fixes the issue your experiencing? 

For the proposed PR - it looks like it's just pending an accelerate version upgrade -- @SunMarc any update on the status here? 

Regarding the bot, we understand that it can be frustrating if an issue hasn't been addressed and it's threatening to close because of inactivity - there's a reason you reported this and you'd like it to be fixed! For context, we get a lot of github issues and pull requests per day -- I had 200 notifications this morning -- and we're all trying our best to go through and address them. The bot serves two uses: 1) it closes issues which really are stale and not relevant automatically for the maintainers (reporter hasn't replied to questions from maintainers; issue was fixed elsewhere; irrelevant issue which doesn't follow guidelines etc.) 2) helpful reminder for maintainers if there's a pending issue which hasn't been addressed as it bumps things back to the top of our inbox.   

> For the proposed PR - it looks like it's just pending an accelerate version upgrade -- @SunMarc any update on the status here?

I'm running the tests to see if bumping the min version does not create any issue ! I will open a PR shortly ! 

Gentle ping @SunMarc 

This have been solved here : https://github.com/huggingface/transformers/pull/32627 ! We bumped the accelerate version to v0.26.0. Closing the issue !