class_docstr: Iteration-based Runner.
  
  This runner train models iteration by iteration.
class_docstr_tok: ["Iteration-based","Runner",".","This","runner","train","models","iteration","by","iteration","."]
docstr: Register default hooks for iter-based training.
  
  Checkpoint hook, optimizer stepper hook and logger hooks will be set to
  `by_epoch=False` by default.
  
  Default hooks include:
  
  +----------------------+-------------------------+
  | Hooks                | Priority                |
  +======================+=========================+
  | LrUpdaterHook        | VERY_HIGH (10)          |
  +----------------------+-------------------------+
  | MomentumUpdaterHook  | HIGH (30)               |
  +----------------------+-------------------------+
  | OptimizerStepperHook | ABOVE_NORMAL (40)       |
  +----------------------+-------------------------+
  | CheckpointSaverHook  | NORMAL (50)             |
  +----------------------+-------------------------+
  | IterTimerHook        | LOW (70)                |
  +----------------------+-------------------------+
  | LoggerHook(s)        | VERY_LOW (90)           |
  +----------------------+-------------------------+
  | CustomHook(s)        | defaults to NORMAL (50) |
  +----------------------+-------------------------+
  
  If custom hooks have same priority with default hooks, custom hooks
  will be triggered after default hooks.
docstr_tok: ["Register","default","hooks","for","iter-based","training",".","Checkpoint","hook",",","optimizer","stepper","hook","and","logger","hooks","will","be","set","to","`","by_epoch=False","`","by","default",".","Default","hooks","include",":","+","--","--","--","--","--","--","--","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","--","--","-+","|","Hooks","|","Priority","|","+======================+=========================+","|","LrUpdaterHook","|","VERY_HIGH","(","10",")","|","+","--","--","--","--","--","--","--","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","--","--","-+","|","MomentumUpdaterHook","|","HIGH","(","30",")","|","+","--","--","--","--","--","--","--","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","--","--","-+","|","OptimizerStepperHook","|","ABOVE_NORMAL","(","40",")","|","+","--","--","--","--","--","--","--","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","--","--","-+","|","CheckpointSaverHook","|","NORMAL","(","50",")","|","+","--","--","--","--","--","--","--","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","--","--","-+","|","IterTimerHook","|","LOW","(","70",")","|","+","--","--","--","--","--","--","--","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","--","--","-+","|","LoggerHook","(","s",")","|","VERY_LOW","(","90",")","|","+","--","--","--","--","--","--","--","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","--","--","-+","|","CustomHook","(","s",")","|","defaults","to","NORMAL","(","50",")","|","+","--","--","--","--","--","--","--","--","--","--","--","+","--","--","--","--","--","--","--","--","--","--","--","--","-+","If","custom","hooks","have","same","priority","with","default","hooks",",","custom","hooks","will","be","triggered","after","default","hooks","."]
code: def register_training_hooks(
      self,
      lr_config,
      optimizer_config=None,
      checkpoint_config=None,
      log_config=None,
      momentum_config=None,
      custom_hooks_config=None,
  ):
      """Register default hooks for iter-based training.
  
      Checkpoint hook, optimizer stepper hook and logger hooks will be set to
      `by_epoch=False` by default.
  
      Default hooks include:
  
      +----------------------+-------------------------+
      | Hooks                | Priority                |
      +======================+=========================+
      | LrUpdaterHook        | VERY_HIGH (10)          |
      +----------------------+-------------------------+
      | MomentumUpdaterHook  | HIGH (30)               |
      +----------------------+-------------------------+
      | OptimizerStepperHook | ABOVE_NORMAL (40)       |
      +----------------------+-------------------------+
      | CheckpointSaverHook  | NORMAL (50)             |
      +----------------------+-------------------------+
      | IterTimerHook        | LOW (70)                |
      +----------------------+-------------------------+
      | LoggerHook(s)        | VERY_LOW (90)           |
      +----------------------+-------------------------+
      | CustomHook(s)        | defaults to NORMAL (50) |
      +----------------------+-------------------------+
  
      If custom hooks have same priority with default hooks, custom hooks
      will be triggered after default hooks.
      """
      if checkpoint_config is not None:
          checkpoint_config.setdefault("by_epoch", False)
      if lr_config is not None:
          lr_config.setdefault("by_epoch", False)
      if log_config is not None:
          for info in log_config["hooks"]:
              info.setdefault("by_epoch", False)
      super(IterBasedRunner, self).register_training_hooks(
          lr_config=lr_config,
          momentum_config=momentum_config,
          optimizer_config=optimizer_config,
          checkpoint_config=checkpoint_config,
          log_config=log_config,
          timer_config=IterTimerHook(),
          custom_hooks_config=custom_hooks_config,
      )
  
imports: import os.path
  import platform
  import shutil
  import time
  import warnings
  import torch
  from torch.optim import Optimizer
  import annotator.uniformer.mmcv
  from .base_runner import BaseRunner
  from .builder import RUNNERS
  from .checkpoint import save_checkpoint
  from .hooks import IterTimerHook
  from .utils import get_host_info
label_desc: Use image node_id 6 for calling the IterBasedRunner obj's underlying member method code with example usage: obj.register_training_hooks(lr_config, optimizer_config, checkpoint_config, log_config, momentum_config, custom_hooks_config) without return types