code: def _write_hparams(
      self, hparam_dict, metric_dict, name, hparam_domain_discrete
  ):
      # adapted from
      # https://github.com/lanpa/tensorboardX/blob/master/tensorboardX/writer.py#L336-L376
      exp, ssi, sei = hparams(
          hparam_dict, metric_dict, hparam_domain_discrete
      )
      w_hp = SummaryWriter(
          log_dir=os.path.join(self._file_writer.log_dir, name)
      )
      w_hp.file_writer.add_summary(exp)
      w_hp.file_writer.add_summary(ssi)
      w_hp.file_writer.add_summary(sei)
      for k, values in metric_dict.items():
          global_step = 0
          for v in values:
              w_hp.add_scalar(k, v, global_step)
              global_step += 1
      w_hp.close()
  
file_path: analytics-zoo/pyzoo/zoo/orca/automl/search/tensorboardlogger.py
imports: from ray.tune.utils import flatten_dict
  import numpy
  import os
  import math
  from torch.utils.tensorboard import SummaryWriter
  from torch.utils.tensorboard.summary import hparams
label_desc: Use image node_id 3 for calling the TensorboardLogger obj's underlying member method code with example usage: obj._write_hparams(hparam_dict, metric_dict, name, hparam_domain_discrete) without return types