class_docstr: A tracker for TensorBoard.
code: def log_metrics(
      self,
      metrics: Mapping[str, float],
      step: Optional[int] = None,
      prefix: Optional[str] = None,
  ) -> None:  # noqa: D102
      metrics = flatten_dictionary(dictionary=metrics, prefix=prefix)
      for key, value in metrics.items():
          self.writer.add_scalar(
              tag=key, scalar_value=value, global_step=step
          )
      self.writer.flush()
  
file_path: pykeen/src/pykeen/trackers/tensorboard.py
imports: import pathlib
  import time
  from typing import TYPE_CHECKING, Any, Mapping, Optional, Union
  from .base import ResultTracker
  from ..constants import PYKEEN_LOGS
  from ..utils import flatten_dictionary, normalize_path
label_desc: Use image node_id 2 for calling the TensorBoardResultTracker obj's underlying member method code with example usage: obj.log_metrics(metrics, step, prefix) without return types