Fix trainer simple tests (#41449)
* fix
* fix ray
* train to tune
* breaking changes wrt generation config
* Fix !
* fix
* fix
* fix deepspeed !
* fix
* fix
* fix
* improve logic
* revert and fix
* revert comment
* oups
* revert change
* fix
* style
* typo in comment
---------
Co-authored-by: Cyril Vallez <cyril.vallez@gmail.com>