class_docstr: Log to local or remote file system in `TensorBoard <https://www.tensorflow.org/tensorboard>`_ format.
  
  Implemented using :class:`~tensorboardX.SummaryWriter`. Logs are saved to
  ``os.path.join(save_dir, name, version)``. This is the default logger in Lightning, it comes
  preinstalled.
  
  This logger supports logging to remote filesystems via ``fsspec``. Make sure you have it installed
  and you don't have tensorflow (otherwise it will use tf.io.gfile instead of fsspec).
  
  Example:
  
  .. testcode::
      :skipif: not _TENSORBOARD_AVAILABLE or not _TENSORBOARDX_AVAILABLE
  
      from lightning.pytorch import Trainer
      from lightning.pytorch.loggers import TensorBoardLogger
  
      logger = TensorBoardLogger("tb_logs", name="my_model")
      trainer = Trainer(logger=logger)
  
  Args:
      save_dir: Save directory
      name: Experiment name. Defaults to ``'default'``. If it is the empty string then no per-experiment
          subdirectory is used.
      version: Experiment version. If version is not specified the logger inspects the save
          directory for existing versions, then automatically assigns the next available version.
          If it is a string then it is used as the run-specific subdirectory name,
          otherwise ``'version_${version}'`` is used.
      log_graph: Adds the computational graph to tensorboard. This requires that
          the user has defined the `self.example_input_array` attribute in their
          model.
      default_hp_metric: Enables a placeholder metric with key `hp_metric` when `log_hyperparams` is
          called without a metric (otherwise calls to log_hyperparams without a metric are ignored).
      prefix: A string to put at the beginning of metric keys.
      sub_dir: Sub-directory to group TensorBoard logs. If a sub_dir argument is passed
          then logs are saved in ``/save_dir/name/version/sub_dir/``. Defaults to ``None`` in which
          logs are saved in ``/save_dir/name/version/``.
      \**kwargs: Additional arguments used by :class:`tensorboardX.SummaryWriter` can be passed as keyword
          arguments in this logger. To automatically flush to disk, `max_queue` sets the size
          of the queue for pending logs before flushing. `flush_secs` determines how many seconds
          elapses before flushing.
docstr: Record hyperparameters. TensorBoard logs with and without saved hyperparameters are incompatible, the
  hyperparameters are then not displayed in the TensorBoard. Please delete or move the previously saved logs to
  display the new ones with hyperparameters.
  
  Args:
      params: a dictionary-like container with the hyperparameters
      metrics: Dictionary with metric names as keys and measured quantities as values
docstr_tok: ["Record","hyperparameters",".","TensorBoard","logs","with","and","without","saved","hyperparameters","are","incompatible",",","the","hyperparameters","are","then","not","displayed","in","the","TensorBoard",".","Please","delete","or","move","the","previously","saved","logs","to","display","the","new","ones","with","hyperparameters",".","Args",":","params",":","a","dictionary-like","container","with","the","hyperparameters","metrics",":","Dictionary","with","metric","names","as","keys","and","measured","quantities","as","values"]
code: def log_hyperparams(  # type: ignore[override]
      self,
      params: Union[Dict[str, Any], Namespace],
      metrics: Optional[Dict[str, Any]] = None,
  ) -> None:
      """Record hyperparameters. TensorBoard logs with and without saved hyperparameters are incompatible, the
      hyperparameters are then not displayed in the TensorBoard. Please delete or move the previously saved logs to
      display the new ones with hyperparameters.
  
      Args:
          params: a dictionary-like container with the hyperparameters
          metrics: Dictionary with metric names as keys and measured quantities as values
  
      """
      if _OMEGACONF_AVAILABLE:
          from omegaconf import Container, OmegaConf
  
      params = _convert_params(params)
  
      # store params to output
      if _OMEGACONF_AVAILABLE and isinstance(params, Container):
          self.hparams = OmegaConf.merge(self.hparams, params)
      else:
          self.hparams.update(params)
  
      return super().log_hyperparams(params=params, metrics=metrics)
  
imports: import logging
  import os
  from argparse import Namespace
  from typing import Any, Dict, Optional, Union
  from torch import Tensor
  from typing_extensions import override
  import lightning.pytorch
  from lightning.fabric.loggers.tensorboard import _TENSORBOARD_AVAILABLE
  from lightning.fabric.loggers.tensorboard import TensorBoardLogger
  from lightning.fabric.utilities.cloud_io import _is_dir
  from lightning.fabric.utilities.logger import _convert_params
  from lightning.fabric.utilities.types import _PATH
  from lightning.pytorch.callbacks import ModelCheckpoint
  from lightning.pytorch.core.saving import save_hparams_to_yaml
  from lightning.pytorch.loggers.logger import Logger
  from lightning.pytorch.utilities.imports import _OMEGACONF_AVAILABLE
  from lightning.pytorch.utilities.rank_zero import rank_zero_only, rank_zero_warn
label_desc: Use image node_id 5 for calling the TensorBoardLogger obj's underlying member method code with example usage: obj.log_hyperparams(params, metrics) and returns: super