- class finetuner.tuner.callback.training_checkpoint.TrainingCheckpoint(save_dir, last_k_epochs=1, verbose=False)¶
Callback to save model at every epoch or the last K epochs
str) – string, path to save the model file.
int) – this parameter is an integer. Only the most recent k checkpoints will be kept. Older checkpoints are deleted.
bool) – Whether to log notifications when a checkpoint is saved/deleted.
Called at the end of an epoch, after both training and validation (or just training if no validaton is provided).
- static load(tuner, fp)¶
Loads the model and tuner state