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 a group of scalars to vdl record file.
  
  Args:
      main_tag (string): Data identifier
      tag_scalar_dict (float): A dict to provide multi-values with tags
      step (int): Step of scalar
      walltime (int): Wall time of scalar
  
  Example:
      import math
      for index in range(1, 101):
          alpha = index*2*math.pi/100
          tval = {'sin':math.sin(alpha), 'cos':math.cos(alpha)}
          writer.add_scalars(tag="sin_and_cos", tag_value=tval, step=index)
code: def add_scalars(self, main_tag, tag_scalar_dict, step, walltime=None):
      """Add a group of scalars to vdl record file.
  
      Args:
          main_tag (string): Data identifier
          tag_scalar_dict (float): A dict to provide multi-values with tags
          step (int): Step of scalar
          walltime (int): Wall time of scalar
  
      Example:
          import math
          for index in range(1, 101):
              alpha = index*2*math.pi/100
              tval = {'sin':math.sin(alpha), 'cos':math.cos(alpha)}
              writer.add_scalars(tag="sin_and_cos", tag_value=tval, step=index)
      """
      if "%" in main_tag:
          raise RuntimeError("% can't appear in tag!")
      if not isinstance(tag_scalar_dict, dict):
          raise RuntimeError("tag_value must be a dict!")
      walltime = (
          round(time.time() * 1000) if walltime is None else walltime
      )
      for record in scalars(main_tag, tag_scalar_dict, step, walltime):
          self._get_file_writer().add_record(record)
  
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 7 for calling the LogWriter obj's underlying member method code with example usage: obj.add_scalars(main_tag, tag_scalar_dict, step, walltime) without return types