class_docstr: The base class of Runner, a training helper for PyTorch.
  
  All subclasses should implement the following APIs:
  
  - ``run()``
  - ``train()``
  - ``val()``
  - ``save_checkpoint()``
  
  Args:
      model (:obj:`torch.nn.Module`): The model to be run.
      batch_processor (callable): A callable method that process a data
          batch. The interface of this method should be
          `batch_processor(model, data, train_mode) -> dict`
      optimizer (dict or :obj:`torch.optim.Optimizer`): It can be either an
          optimizer (in most cases) or a dict of optimizers (in models that
          requires more than one optimizer, e.g., GAN).
      work_dir (str, optional): The working directory to save checkpoints
          and logs. Defaults to None.
      logger (:obj:`logging.Logger`): Logger used during training.
           Defaults to None. (The default value is just for backward
           compatibility)
      meta (dict | None): A dict records some import information such as
          environment info and seed, which will be logged in logger hook.
          Defaults to None.
      max_epochs (int, optional): Total training epochs.
      max_iters (int, optional): Total training iterations.
class_docstr_tok: ["The","base","class","of","Runner",",","a","training","helper","for","PyTorch",".","All","subclasses","should","implement","the","following","APIs",":","-","``","run","(",")","``","-","``","train","(",")","``","-","``","val","(",")","``","-","``","save_checkpoint","(",")","``","Args",":","model","(",":","obj",":","`","torch.nn.Module","`",")",":","The","model","to","be","run",".","batch_processor","(","callable",")",":","A","callable","method","that","process","a","data","batch",".","The","interface","of","this","method","should","be","`","batch_processor","(","model",",","data",",","train_mode",")","-",">","dict","`","optimizer","(","dict","or",":","obj",":","`","torch.optim.Optimizer","`",")",":","It","can","be","either","an","optimizer","(","in","most","cases",")","or","a","dict","of","optimizers","(","in","models","that","requires","more","than","one","optimizer",",","e.g.",",","GAN",")",".","work_dir","(","str",",","optional",")",":","The","working","directory","to","save","checkpoints","and","logs",".","Defaults","to","None",".","logger","(",":","obj",":","`","logging.Logger","`",")",":","Logger","used","during","training",".","Defaults","to","None",".","(","The","default","value","is","just","for","backward","compatibility",")","meta","(","dict","|","None",")",":","A","dict","records","some","import","information","such","as","environment","info","and","seed",",","which","will","be","logged","in","logger","hook",".","Defaults","to","None",".","max_epochs","(","int",",","optional",")",":","Total","training","epochs",".","max_iters","(","int",",","optional",")",":","Total","training","iterations","."]
docstr: Get current learning rates.
  
  Returns:
      list[float] | dict[str, list[float]]: Current learning rates of all
          param groups. If the runner has a dict of optimizers, this
          method will return a dict.
docstr_tok: ["Get","current","learning","rates",".","Returns",":","list","[","float","]","|","dict","[","str",",","list","[","float","]","]",":","Current","learning","rates","of","all","param","groups",".","If","the","runner","has","a","dict","of","optimizers",",","this","method","will","return","a","dict","."]
code: def current_lr(self):
      """Get current learning rates.
  
      Returns:
          list[float] | dict[str, list[float]]: Current learning rates of all
              param groups. If the runner has a dict of optimizers, this
              method will return a dict.
      """
      if isinstance(self.optimizer, torch.optim.Optimizer):
          lr = [group["lr"] for group in self.optimizer.param_groups]
      elif isinstance(self.optimizer, dict):
          lr = dict()
          for name, optim in self.optimizer.items():
              lr[name] = [group["lr"] for group in optim.param_groups]
      else:
          raise RuntimeError(
              "lr is not applicable because optimizer does not exist."
          )
      return lr
  
imports: import copy
  import logging
  import os.path
  import warnings
  from abc import ABCMeta, abstractmethod
  import torch
  from torch.optim import Optimizer
  import annotator.uniformer.mmcv
  from ..parallel import is_module_wrapper
  from .checkpoint import load_checkpoint
  from .dist_utils import get_dist_info
  from .hooks import HOOKS, Hook
  from .log_buffer import LogBuffer
  from .priority import Priority, get_priority
  from .utils import get_time_str
label_desc: Use image node_id 15 for calling the BaseRunner obj's underlying member method code with example usage: obj.current_lr() and returns: lr