Introduce AcceleratorConfig dataclass (#28664)
* Introduce acceleratorconfig dataclass
* Extra second warn
* Move import
* Try moving import under is_accelerate_available
* Quality
* Apply suggestions from code review
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
* Clean
* Remove to_kwargs
* Change version
* Improve tests by including dispatch and split batches
* Improve reliability
* Update tests/trainer/test_trainer.py
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>
* Fixup tests and review nits
* Make tests pass
* protect import
* Protect import
* Empty-Commit
* Make training_args.to_dict handle the AcceleratorConfig
---------
Co-authored-by: amyeroberts <22614925+amyeroberts@users.noreply.github.com>