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_end(self, epoch, logs=None):
      if logs:
          self.epoch_metrics["loss"].append(logs["loss"])
      if logs.get("val_loss"):  # if it exists
          self.epoch_metrics["val_loss"].append(logs["val_loss"])
  
file_path: pywick/pywick/callbacks/History.py
imports: from .None import Callback
label_desc: Use image node_id 4 for calling the History obj's underlying member method code with example usage: obj.on_epoch_end(epoch, logs) without return types