[Feature] Save optimizer-related params in the best epoch checkpoint
What is the feature?
I notice that mmengine does not save optimizer-related params, e.g. learning rate, so user cannot resume training from the best checkpoint. However, in an industrial development, it is an important feature to resume training from the last best checkpoint.
Any other context?
No response
@HAOCHENYE I suffered from the same issue. I think it's very unexpected from this class and should be considered a bug, rather than a feature request.
This line : https://github.com/open-mmlab/mmengine/blob/main/mmengine/hooks/checkpoint_hook.py#L564
Should reuse the same self.attribute as this line
https://github.com/open-mmlab/mmengine/blob/main/mmengine/hooks/checkpoint_hook.py#L447
I did a PR: https://github.com/open-mmlab/mmengine/pull/1454