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.
code: def log_graph(  # type: ignore[override]
      self,
      model: "pl.LightningModule",
      input_array: Optional[Tensor] = None,
  ) -> None:
      if not self._log_graph:
          return
  
      input_array = (
          model.example_input_array
          if input_array is None
          else input_array
      )
  
      if input_array is None:
          rank_zero_warn(
              "Could not log computational graph to TensorBoard: The `model.example_input_array` attribute"
              " is not set or `input_array` was not given."
          )
      elif not isinstance(input_array, (Tensor, tuple)):
          rank_zero_warn(
              "Could not log computational graph to TensorBoard: The `input_array` or `model.example_input_array`"
              f" has type {type(input_array)} which can't be traced by TensorBoard. Make the input array a tuple"
              f" representing the positional arguments to the model's `forward()` implementation."
          )
      else:
          input_array = model._on_before_batch_transfer(input_array)
          input_array = model._apply_batch_transfer_handler(input_array)
          with pl.core.module._jit_is_scripting():
              self.experiment.add_graph(model, input_array)
  
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 6 for calling the TensorBoardLogger obj's underlying member method code with example usage: obj.log_graph(model, input_array) without return types