Class equivalent to ModelCheckpoint(Keras) in Pytorch?

Is there a class in Pytorch which can save the best accurate model of all the epochs automatically ?

For example : https://keras.io/api/callbacks/model_checkpoint/

There, they have options like ModelCheckpoint which saves the best model. Also like EarlyStopping.

Just wondering if there is any alternative in Pytorch.

You should be able to find these higher-level APIs and hooks in wrappers such as Ignite, PyTorch Lightning, Catalyst etc.