class_docstr: Reporter class.
  
  Examples:
  
      >>> reporter = Reporter()
      >>> with reporter.observe('train') as sub_reporter:
      ...     for batch in iterator:
      ...         stats = dict(loss=0.2)
      ...         sub_reporter.register(stats)
class_docstr_tok: ["Reporter","class",".","Examples",":",">",">",">","reporter","=","Reporter","(",")",">",">",">","with","reporter.observe","(","'train","'",")","as","sub_reporter",":","...","for","batch","in","iterator",":","...","stats","=","dict","(","loss=0.2",")","...","sub_reporter.register","(","stats",")"]
code: def wandb_log(self, epoch: int = None):
      import wandb
  
      if epoch is None:
          epoch = self.get_epoch()
  
      d = {}
      for key1 in self.get_keys(epoch):
          for key2 in self.stats[epoch][key1]:
              if key2 in ("time", "total_count"):
                  continue
              key = f"{key1}_{key2}_epoch"
              d[wandb_get_prefix(key) + key] = self.stats[epoch][key1][
                  key2
              ]
      d["epoch"] = epoch
      wandb.log(d)
  
imports: import dataclasses
  import datetime
  import logging
  import time
  import warnings
  from collections import defaultdict
  from contextlib import contextmanager
  from pathlib import Path
  from typing import ContextManager, Dict, List, Optional, Sequence, Tuple, Union
  import humanfriendly
  import numpy
  import torch
  from packaging.version import parse
  from typeguard import check_argument_types, check_return_type
label_desc: Use image node_id 21 for calling the Reporter obj's underlying member method code with example usage: obj.wandb_log(epoch) without return types