Is there any official implement to rollback checkpoint and continue to training

I write my own coding to save checkpoint and do the rollback by early stopping.
I’d like to know if anyone have better implementation to share.

Best regard,
Hong