class_docstr: Callback for auto-logging metrics and parameters.
class_docstr_tok: ["Callback","for","auto-logging","metrics","and","parameters","."]
docstr: Log metric values after each step
  
  :param trainer: pytorch lightning trainer instance
  :param pl_module: pytorch lightning base module
docstr_tok: ["Log","metric","values","after","each","step",":","param","trainer",":","pytorch","lightning","trainer","instance",":","param","pl_module",":","pytorch","lightning","base","module"]
code: def on_train_batch_end(
      self, trainer, pl_module, *args
  ):  # pylint: disable=signature-differs,arguments-differ,unused-argument
      """
      Log metric values after each step
  
      :param trainer: pytorch lightning trainer instance
      :param pl_module: pytorch lightning base module
      """
      if not self.log_every_n_step:
          return
      # When logging at the end of a batch step, we only want to log metrics that are logged
      # on steps. For forked metrics (metrics logged on both steps and epochs), we exclude the
      # metric with the non-forked name (eg. "loss" when we have "loss", "loss_step" and
      # "loss_epoch") so that this is only logged on epochs. We also record which metrics
      # we've logged per step, so we can later exclude these from metrics logged on epochs.
      metrics = _get_step_metrics(trainer)
      metric_items = [
          (name, val)
          for (name, val) in metrics.items()
          if (name not in self._epoch_metrics)
          and (f"{name}_step" not in metrics.keys())
      ]
      self._step_metrics.update(name for (name, _) in metric_items)
      step = trainer.global_step
      if (
          (step // self._global_steps_per_training_step) + 1
      ) % self.log_every_n_step == 0:
          self._log_metrics(trainer, step, metric_items)
  
imports: import logging
  import os
  import tempfile
  import warnings
  from packaging.version import Version
  import mlflow.pytorch
  from mlflow.exceptions import MlflowException
  from mlflow.ml_package_versions import _ML_PACKAGE_VERSIONS
  from mlflow.pytorch import _pytorch_autolog
  from mlflow.utils.autologging_utils import BatchMetricsLogger, ExceptionSafeAbstractClass, MlflowAutologgingQueueingClient, get_autologging_config
  import pytorch_lightning
  from pytorch_lightning.utilities import rank_zero_only
label_desc: Use image node_id 4 for calling the __MLflowPLCallback obj's underlying member method code with example usage: obj.on_train_batch_end(trainer, pl_module) without return types