docstr: Initialize a tensorboard logger
  
  Note that this logger relies on tensorboardx and only provide tensorboard hparams log.
  An ImportError will be raised for the lack of torch
  
  :param logs_dir: root directory for the log, default to the current working dir
  :param writer: shared tensorboard SummaryWriter, default to None.
docstr_tok: ["Initialize","a","tensorboard","logger","Note","that","this","logger","relies","on","tensorboardx","and","only","provide","tensorboard","hparams","log",".","An","ImportError","will","be","raised","for","the","lack","of","torch",":","param","logs_dir",":","root","directory","for","the","log",",","default","to","the","current","working","dir",":","param","writer",":","shared","tensorboard","SummaryWriter",",","default","to","None","."]
code: def __init__(self, logs_dir="", writer=None, name="AutoML"):
      """
      Initialize a tensorboard logger
  
      Note that this logger relies on tensorboardx and only provide tensorboard hparams log.
      An ImportError will be raised for the lack of torch
  
      :param logs_dir: root directory for the log, default to the current working dir
      :param writer: shared tensorboard SummaryWriter, default to None.
      """
      self.logs_dir = logs_dir
      self.name = name
      self._file_writer = None
      if writer:
          self._file_writer = writer
      else:
          self._file_writer = SummaryWriter(log_dir=self.logs_dir)
  
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 1 to create a new TensorboardLogger object  with example: obj = TensorboardLogger(logs_dir, writer, name)