class_docstr: Log writer to write vdl records to log file.
  
  The class `LogWriter` provides APIs to create record file and add records to
  it. The class updates log file asynchronously without slowing down training.
class_docstr_tok: ["Log","writer","to","write","vdl","records","to","log","file",".","The","class","`","LogWriter","`","provides","APIs","to","create","record","file","and","add","records","to","it",".","The","class","updates","log","file","asynchronously","without","slowing","down","training","."]
docstr: Add an histogram to vdl record file.
  
  Args:
      hparams_dict (dictionary): Each key-value pair in the dictionary is the
        name of the hyper parameter and it's corresponding value. The type of the value
        can be one of `string`, `float` or `int`.
      metrics_list (list): Name of all metrics.
      walltime (int): Wall time of hparams.
  
  Examples::
      from visualdl import LogWriter
  
      # Remember use add_scalar to log your metrics data!
      with LogWriter('./log/hparams_test/train/run1') as writer:
          writer.add_hparams({'lr': 0.1, 'bsize': 1, 'opt': 'sgd'}, ['hparam/accuracy', 'hparam/loss'])
          for i in range(10):
              writer.add_scalar('hparam/accuracy', i, i)
              writer.add_scalar('hparam/loss', 2*i, i)
  
      with LogWriter('./log/hparams_test/train/run2') as writer:
          writer.add_hparams({'lr': 0.2, 'bsize': 2, 'opt': 'relu'}, ['hparam/accuracy', 'hparam/loss'])
          for i in range(10):
              writer.add_scalar('hparam/accuracy', 1.0/(i+1), i)
              writer.add_scalar('hparam/loss', 5*i, i)
code: def add_hparams(self, hparams_dict, metrics_list, walltime=None):
      """Add an histogram to vdl record file.
  
      Args:
          hparams_dict (dictionary): Each key-value pair in the dictionary is the
            name of the hyper parameter and it's corresponding value. The type of the value
            can be one of `string`, `float` or `int`.
          metrics_list (list): Name of all metrics.
          walltime (int): Wall time of hparams.
  
      Examples::
          from visualdl import LogWriter
  
          # Remember use add_scalar to log your metrics data!
          with LogWriter('./log/hparams_test/train/run1') as writer:
              writer.add_hparams({'lr': 0.1, 'bsize': 1, 'opt': 'sgd'}, ['hparam/accuracy', 'hparam/loss'])
              for i in range(10):
                  writer.add_scalar('hparam/accuracy', i, i)
                  writer.add_scalar('hparam/loss', 2*i, i)
  
          with LogWriter('./log/hparams_test/train/run2') as writer:
              writer.add_hparams({'lr': 0.2, 'bsize': 2, 'opt': 'relu'}, ['hparam/accuracy', 'hparam/loss'])
              for i in range(10):
                  writer.add_scalar('hparam/accuracy', 1.0/(i+1), i)
                  writer.add_scalar('hparam/loss', 5*i, i)
      """
      if type(hparams_dict) is not dict:
          raise TypeError("hparam_dict should be dictionary!")
      if type(metrics_list) is not list:
          raise TypeError("metric_list should be list!")
      walltime = (
          round(time.time() * 1000) if walltime is None else walltime
      )
  
      self._get_file_writer().add_record(
          hparam(
              name=md5(self.file_name),
              hparam_dict=hparams_dict,
              metric_list=metrics_list,
              walltime=walltime,
          )
      )
  
imports: import os
  import time
  import numpy
  from visualdl.component.base_component import audio
  from visualdl.component.base_component import embedding
  from visualdl.component.base_component import histogram
  from visualdl.component.base_component import hparam
  from visualdl.component.base_component import image
  from visualdl.component.base_component import meta_data
  from visualdl.component.base_component import pr_curve
  from visualdl.component.base_component import roc_curve
  from visualdl.component.base_component import scalar
  from visualdl.component.base_component import scalars
  from visualdl.component.base_component import text
  from visualdl.component.graph import translate_graph
  from visualdl.io import bfile
  from visualdl.server.log import logger
  from visualdl.utils.figure_util import figure_to_image
  from visualdl.utils.img_util import merge_images
  from visualdl.utils.md5_util import md5
  from visualdl.writer.record_writer import RecordFileWriter
label_desc: Use image node_id 15 for calling the LogWriter obj's underlying member method code with example usage: obj.add_hparams(hparams_dict, metrics_list, walltime) without return types