class_docstr: Track the result of an experiment, including uploading result to W&B, calculating validation score
  and maintaining best result.
  
  Args:
      kwargs: The arguments of `wandb.init()`
      is_local_main_process: Decide whether to upload result
      metrics_for_best_model: A set of entry to calculate validation score.
      email: Whether to send an email through W&B.
  
  Examples:
      >>> summary_tracker = SummaryTracker.basicConfig(config)
      >>> with summary_tracker.new_experiment():
      >>>     # at the beginning of a validation epoch
      >>>     with summary_tracker.new_epoch('valid'):
      >>>         for step in valid_data:
      >>>             summary_tracker.new_step()
      >>>             ...
      >>>             summary_tracker.append_loss(1.0)
      >>>         summary_tracker.set_metrics_results({'metric-1': 1.0, 'metric-2': 2.0})
      >>>         best_valid_timestamp, current_best = summary_tracker.get_best_valid()
class_docstr_tok: ["Track","the","result","of","an","experiment",",","including","uploading","result","to","W","&","B",",","calculating","validation","score","and","maintaining","best","result",".","Args",":","kwargs",":","The","arguments","of","`","wandb.init","(",")","`","is_local_main_process",":","Decide","whether","to","upload","result","metrics_for_best_model",":","A","set","of","entry","to","calculate","validation","score",".","email",":","Whether","to","send","an","email","through","W","&","B",".","Examples",":",">",">",">","summary_tracker","=","SummaryTracker.basicConfig","(","config",")",">",">",">","with","summary_tracker.new_experiment","(",")",":",">",">",">","#","at","the","beginning","of","a","validation","epoch",">",">",">","with","summary_tracker.new_epoch","(","'valid","'",")",":",">",">",">","for","step","in","valid_data",":",">",">",">","summary_tracker.new_step","(",")",">",">",">","...",">",">",">","summary_tracker.append_loss","(","1.0",")",">",">",">","summary_tracker.set_metrics_results","(","{","'metric-1","'",":","1.0",",","'metric-2","'",":","2.0","}",")",">",">",">","best_valid_timestamp",",","current_best","=","summary_tracker.get_best_valid","(",")"]
docstr: Call at the beginning of one step.
code: def new_step(self):
      r"""Call at the beginning of one step."""
      self.axes.update_axe(self._current_mode, "step")
  
imports: from contextlib import contextmanager
  from copy import copy
  from accelerate.logging import get_logger
  import math
  import os
  from time import time
  from typing import Iterable, Optional, Set, Union, Callable
  import traceback
  import torch
  import wandb
  from wandb import AlertLevel
  from textbox.config.configurator import Config
label_desc: Use image node_id 5 for calling the SummaryTracker obj's underlying member method code with example usage: obj.new_step() without return types