Saving only the best performing checkpoint

Hi,

Is there a parameter in config that allows us to save only the best performing checkpoint ?
Currently, multiple checkpoints are saved based on save_steps (, batch_size and dataset size). If we want to train the model for lets say 10 epochs and 7th epoch gives the best performance on validation set, then how can we just save the checkpoint from 7th epoch and ignore the rest.

Thanks.

There is no parameter for that yet, keeping this in mind for the future development of Trainer.

1 Like