Load Trainer state
# 🚀 Feature request

Hi,
I wonder if there is a method to load a saved state of the trainer, so that I can continue the training loop from where I started.
If I understand it right, I need to load the saved states of _model_, _optimizer_ and _scheduler_. 
## Motivation

However, it would be much more convenient to have all of this done in one method, when you only pass the `results` folder path to the method.

## Your contribution

In case there is not, I can submit the PR, since it does not seem too hard to be prepared.

cc @sgugger <|||||>How would this be different from
```
trainer.train(resume_from_checkpoint=True)
```
?<|||||>That's pretty similar, still, when one needs to use `trainer.predict` of a trained model, for instance.<|||||>You don't need the optimizer and scheduler states for this, just the model.<|||||>This makes sense, thank you! Closing the issue.

On Wed, 7 Jul 2021 at 16:33, Sylvain Gugger ***@***.***>
wrote:

> You don't need the optimizer and scheduler states for this, just the model.
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/huggingface/transformers/issues/12529#issuecomment-875608286>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AIXZKXIKEBB7ZHSHCE7DJC3TWRJTTANCNFSM474BV33Q>
> .
>
