code: def on_epoch_end(self, epoch:int, num_batch:int, smooth_loss:Tensor,
                       last_metrics=MetricsList, **kwargs:Any)->bool:
          "Save epoch info: num_batch, smooth_loss, metrics."
          self.nb_batches.append(num_batch)
          if last_metrics is not None: self.val_losses.append(last_metrics[0])
          else: last_metrics = [] if self.no_val else [None]
          if len(last_metrics) > 1: self.metrics.append(last_metrics[1:])
          self.format_stats([epoch, smooth_loss] + last_metricsf on_epoch_end(self, epoch:int, num_batch:int, smooth_loss:Tensor,
                       last_metrics=MetricsList, **kwargs:Any)->bool:
          "Save epoch info: num_batch, smooth_loss, metrics."
          self.nb_batches.append(num_batch)
          if last_metrics is not None: self.val_losses.append(last_metrics[0])
          else: last_metrics = [] if self.no_val else [None]
          if len(last_metrics) > 1: self.metrics.append(last_metrics[1:])
          self.format_stats([epoch, smooth_loss] + last_metrics)
docs: Save epoch info: num_batch, smooth_loss, metrics.