class_docstr: TensorBoardX Logger.
  
  Note that hparams will be written only after a trial has terminated.
  This logger automatically flattens nested dicts to show on TensorBoard:
  
      {"a": {"b": 1, "c": 2}} -> {"a/b": 1, "a/c": 2}
code: def _try_log_hparams(self, result):
      # TBX currently errors if the hparams value is None.
      flat_params = flatten_dict(self.trial.evaluated_params)
      scrubbed_params = {
          k: v
          for k, v in flat_params.items()
          if isinstance(v, self.VALID_HPARAMS)
      }
  
      np_params = {
          k: v.tolist()
          for k, v in flat_params.items()
          if isinstance(v, self.VALID_NP_HPARAMS)
      }
  
      scrubbed_params.update(np_params)
  
      removed = {
          k: v
          for k, v in flat_params.items()
          if not isinstance(
              v, self.VALID_HPARAMS + self.VALID_NP_HPARAMS
          )
      }
      if removed:
          logger.info(
              "Removed the following hyperparameter values when "
              "logging to tensorboard: %s",
              str(removed),
          )
  
      from tensorboardX.summary import hparams
  
      try:
          experiment_tag, session_start_tag, session_end_tag = hparams(
              hparam_dict=scrubbed_params, metric_dict=result
          )
          self._file_writer.file_writer.add_summary(experiment_tag)
          self._file_writer.file_writer.add_summary(session_start_tag)
          self._file_writer.file_writer.add_summary(session_end_tag)
      except Exception:
          logger.exception(
              "TensorboardX failed to log hparams. "
              "This may be due to an unsupported type "
              "in the hyperparameter values."
          )
  
imports: import logging
  import numpy
  from typing import TYPE_CHECKING, Dict
  from ray.air.constants import TRAINING_ITERATION
  from ray.tune.logger.logger import _LOGGER_DEPRECATION_WARNING, Logger, LoggerCallback
  from ray.util.debug import log_once
  from ray.tune.result import TIME_TOTAL_S, TIMESTEPS_TOTAL
  from ray.tune.utils import flatten_dict
  from ray.util.annotations import Deprecated, PublicAPI
label_desc: Use image node_id 5 for calling the TBXLogger obj's underlying member method code with example usage: obj._try_log_hparams(result) without return types