class_docstr: A `Callback` that keeps track of the best value in `monitor`.
class_docstr_tok: ["A","`","Callback","`","that","keeps","track","of","the","best","value","in","`","monitor","`","."]
code: def __init__(
      self,
      monitor="valid_loss",  # value (usually loss or metric) being monitored.
      comp=None,  # numpy comparison operator; np.less if monitor is loss, np.greater if monitor is metric.
      min_delta=0.0,  # minimum delta between the last monitor value and the best monitor value.
      reset_on_fit=True,  # before model fitting, reset value being monitored to -infinity (if monitor is metric) or +infinity (if monitor is loss).
  ):
      if comp is None:
          comp = (
              np.less
              if "loss" in monitor or "error" in monitor
              else np.greater
          )
      if comp == np.less:
          min_delta *= -1
      (
          self.monitor,
          self.comp,
          self.min_delta,
          self.reset_on_fit,
          self.best,
      ) = (monitor, comp, min_delta, reset_on_fit, None)
  
imports: from __future__ import annotations
  from ..basics import *
  from .progress import *
  from .fp16 import MixedPrecision
label_desc: Use image node_id 1 to create a new TrackerCallback object from inherited base classes: Callback with example: obj = TrackerCallback(monitor, comp, min_delta, reset_on_fit)