class_docstr: A `TrackerCallback` that saves the model's best during training and loads it at the end.
class_docstr_tok: ["A","`","TrackerCallback","`","that","saves","the","model","'s","best","during","training","and","loads","it","at","the","end","."]
code: def __init__(
      self,
      monitor="valid_loss",
      comp=None,
      min_delta=0.0,
      fname="model",
      every_epoch=False,
      with_opt=False,
      reset_on_fit=True,
      best_epoch_stop=None,
  ):
      super().__init__(
          monitor=monitor,
          comp=comp,
          min_delta=min_delta,
          reset_on_fit=reset_on_fit,
      )
      # keep track of file path for loggers
      self.last_saved_path = None
      self.best_epoch_stop = best_epoch_stop
      store_attr("fname,every_epoch,with_opt")
  
imports: import logging
  import time
  import numpy
  from fastai.callback.core import Callback, CancelFitException
  from fastai.callback.tracker import TrackerCallback
  from fastcore.basics import store_attr
label_desc: Use image node_id 1 to create a new AgSaveModelCallback object from inherited base classes: TrackerCallback with example: obj = AgSaveModelCallback(monitor, comp, min_delta, fname, every_epoch, with_opt, reset_on_fit, best_epoch_stop)