Fix resume_from_checkpoint for deepspeed [by mosheber]
# What does this PR do?

From #21735 without any change, but to launch CI.
_The documentation is not available anymore as the PR was closed or merged._