class_docstr: Main logger - the aim of this class is to store every log from training
  Log is a float value with corresponding training engine step
class_docstr_tok: ["Main","logger","-","the","aim","of","this","class","is","to","store","every","log","from","training","Log","is","a","float","value","with","corresponding","training","engine","step"]
docstr: Args:
      logs: dictionary with metric names and values
      current_step: current step of the training loop
  
  Notes:
      Loop step can be controlled outside or inside main logger with autoincrement of self.current_step
docstr_tok: ["Args",":","logs",":","dictionary","with","metric","names","and","values","current_step",":","current","step","of","the","training","loop","Notes",":","Loop","step","can","be","controlled","outside","or","inside","main","logger","with","autoincrement","of","self.current_step"]
code: def update(
      self, logs: Dict[str, float], current_step: Optional[int] = None
  ) -> None:
      """
      Args:
          logs: dictionary with metric names and values
          current_step: current step of the training loop
  
      Notes:
          Loop step can be controlled outside or inside main logger with autoincrement of self.current_step
      """
      if current_step is None:
          self.current_step += 1
          current_step = self.current_step
      else:
          self.current_step = current_step
      for k, v in logs.items():
          if k not in self.log_history:
              self._add_new_metric(k)
          self.log_history[k].append(
              LogItem(step=current_step, value=v)
          )
  
file_path: livelossplot/livelossplot/main_logger.py
imports: import re
  from collections import OrderedDict, defaultdict
  from typing import NamedTuple, Dict, Iterable, List, Pattern, Tuple, Optional, Union
label_desc: Use image node_id 2 for calling the MainLogger obj's underlying member method code with example usage: obj.update(logs, current_step) without return types