class_docstr: Plugin that takes care of tensorboard logging.
class_docstr_tok: ["Plugin","that","takes","care","of","tensorboard","logging","."]
code: def metric_recorded(self, record):
      assert self.writer is not None
      # TODO: check if metric is in tracked metrics
      if record.is_scalar:
          self.writer.add_scalar(
              str(record.name),
              record.value,
              record.global_step,
              walltime=record.walltime,
          )
      else:
          if not self._warned:
              log.warning(
                  "Logging anything other than scalars to TensorBoard is currently not supported."
              )
              self._warned = True
  
file_path: flair/flair/trainers/plugins/loggers/tensorboard.py
imports: import logging
  import os
  from typing import Any, Dict
  from flair.trainers.plugins.base import TrainerPlugin
  from flair.training_utils import log_line
label_desc: Use image node_id 2 for calling the TensorboardLogger obj's underlying member method code with example usage: obj.metric_recorded(record) without return types