huggingface / accelerate

🚀 A simple way to launch, train, and use PyTorch models on almost any device and distributed configuration, automatic mixed precision (including fp8), and easy-to-configure FSDP and DeepSpeed support
https://huggingface.co/docs/accelerate
Apache License 2.0
7.97k stars 970 forks source link

Split_batches argument in Accelerator.__init__ is available, but not used #3177

Open yaraksen opened 1 month ago

yaraksen commented 1 month ago

System Info

accelerate==1.0.1

Reproduction

Since the latest versions split_batches is taken from DataLoaderConfiguration, but still can be passed as an argument to Accelerator constructor, which leads to unexpected behavior. You can pass Accelerator(split_batches=True), but it will still be False

Expected behavior

There should not be 2 different places where argument can be passed or an exception should be raised

github-actions[bot] commented 5 days ago

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 are likely to be ignored.