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: The function generate transforms for metric names base on patterns
  Args:
      metric_name: name of new appended metric
  
  Example:
      It can create transformation from val_acc to Validation Accuracy
docstr_tok: ["The","function","generate","transforms","for","metric","names","base","on","patterns","Args",":","metric_name",":","name","of","new","appended","metric","Example",":","It","can","create","transformation","from","val_acc","to","Validation","Accuracy"]
code: def _auto_generate_metrics_to_name(self, metric_name: str):
      """The function generate transforms for metric names base on patterns
      Args:
          metric_name: name of new appended metric
  
      Example:
          It can create transformation from val_acc to Validation Accuracy
      """
      suffix = self._find_suffix_with_group_patterns(metric_name)
      if suffix is None and suffix != metric_name:
          return
      similar_metric_names = [
          m for m in self.log_history.keys() if m.endswith(suffix)
      ]
      if len(similar_metric_names) == 1:
          return
      for name in similar_metric_names:
          new_name = name
          for pattern_to_replace, replace_with in self.group_patterns:
              new_name = re.sub(
                  pattern_to_replace, replace_with, new_name
              )
          if suffix in COMMON_NAME_SHORTCUTS.keys():
              new_name = new_name.replace(
                  suffix, COMMON_NAME_SHORTCUTS[suffix]
              )
          self.metric_to_name[name] = new_name
  
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 4 for calling the MainLogger obj's underlying member method code with example usage: obj._auto_generate_metrics_to_name(metric_name) without return types