fix bugs with trainer (#24134)
* fix the deepspeed test failures
* apex fix
* FSDP save ckpt fix
* Update src/transformers/trainer.py
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>
---------
Co-authored-by: Sylvain Gugger <35901082+sgugger@users.noreply.github.com>