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_train_begin(self, logs=None):
      self.epoch_metrics = {"loss": []}
      self.batch_size = logs["batch_size"]
      self.has_val_data = logs["has_val_data"]
      self.has_regularizers = logs["has_regularizers"]
      if self.has_val_data:
          self.epoch_metrics["val_loss"] = []
      if self.has_regularizers:
          self.epoch_metrics["reg_loss"] = []
  
file_path: pywick/pywick/callbacks/History.py
imports: from .None import Callback
label_desc: Use image node_id 2 for calling the History obj's underlying member method code with example usage: obj.on_train_begin(logs) without return types