class_docstr: Callback that records events into a `History` object.
  
  This callback is automatically applied to
  every SuperModule.
class_docstr_tok: ["Callback","that","records","events","into","a","`","History","`","object",".","This","callback","is","automatically","applied","to","every","SuperModule","."]
code: def on_epoch_begin(self, epoch, logs=None):
      if hasattr(
          self.trainer._optimizer, "_optimizer"
      ):  # accounts for meta-optimizers like YellowFin
          self.lrs = [
              p["lr"]
              for p in self.trainer._optimizer._optimizer.param_groups
          ]
      else:
          self.lrs = [
              p["lr"] for p in self.trainer._optimizer.param_groups
          ]
      self.batch_metrics = {"loss": 0.0}
      if self.has_regularizers:
          self.batch_metrics["reg_loss"] = 0.0
      self.samples_seen = 0.0
  
file_path: pywick/pywick/callbacks/History.py
imports: from .None import Callback
label_desc: Use image node_id 3 for calling the History obj's underlying member method code with example usage: obj.on_epoch_begin(epoch, logs) without return types