class_docstr: Base class for iterative trainer with hooks.
  
  The only assumption we made here is: the training runs in a loop.
  A subclass can implement what the loop is.
  We made no assumptions about the existence of dataloader, optimizer, model, etc.
  
  Attributes:
      iter(int): the current iteration.
  
      start_iter(int): The iteration to start with.
          By convention the minimum possible value is 0.
  
      max_iter(int): The iteration to end training.
  
      storage(EventStorage): An EventStorage that's opened during the course of training.
class_docstr_tok: ["Base","class","for","iterative","trainer","with","hooks",".","The","only","assumption","we","made","here","is",":","the","training","runs","in","a","loop",".","A","subclass","can","implement","what","the","loop","is",".","We","made","no","assumptions","about","the","existence","of","dataloader",",","optimizer",",","model",",","etc",".","Attributes",":","iter","(","int",")",":","the","current","iteration",".","start_iter","(","int",")",":","The","iteration","to","start","with",".","By","convention","the","minimum","possible","value","is","0.","max_iter","(","int",")",":","The","iteration","to","end","training",".","storage","(","EventStorage",")",":","An","EventStorage","that","'s","opened","during","the","course","of","training","."]
code: def __init__(self) -> None:
      self._hooks: List[HookBase] = []
      self.iter: int = 0
      self.start_iter: int = 0
      self.max_iter: int
      self.storage: EventStorage
      _log_api_usage("trainer." + self.__class__.__name__)
  
imports: import concurrent.futures
  import logging
  import numpy
  import time
  import weakref
  from typing import List, Mapping, Optional
  import torch
  from torch.nn.parallel import DataParallel, DistributedDataParallel
  import detectron2.utils.comm
  from detectron2.utils.events import EventStorage, get_event_storage
  from detectron2.utils.logger import _log_api_usage
label_desc: Use image node_id 1 to create a new TrainerBase object  with example: obj = TrainerBase()