class_docstr: A simple trainer for the most common type of task:
  single-cost single-optimizer single-data-source iterative optimization,
  optionally using data-parallelism.
  It assumes that every step, you:
  
  1. Compute the loss with a data from the data_loader.
  2. Compute the gradients with the above loss.
  3. Update the model with the optimizer.
  
  All other tasks during training (checkpointing, logging, evaluation, LR schedule)
  are maintained by hooks, which can be registered by :meth:`TrainerBase.register_hooks`.
  
  If you want to do anything fancier than this,
  either subclass TrainerBase and implement your own `run_step`,
  or write your own training loop.
class_docstr_tok: ["A","simple","trainer","for","the","most","common","type","of","task",":","single-cost","single-optimizer","single-data-source","iterative","optimization",",","optionally","using","data-parallelism",".","It","assumes","that","every","step",",","you",":","1",".","Compute","the","loss","with","a","data","from","the","data_loader",".","2",".","Compute","the","gradients","with","the","above","loss",".","3",".","Update","the","model","with","the","optimizer",".","All","other","tasks","during","training","(","checkpointing",",","logging",",","evaluation",",","LR","schedule",")","are","maintained","by","hooks",",","which","can","be","registered","by",":","meth",":","`","TrainerBase.register_hooks","`",".","If","you","want","to","do","anything","fancier","than","this",",","either","subclass","TrainerBase","and","implement","your","own","`","run_step","`",",","or","write","your","own","training","loop","."]
docstr: Delete and replace the current data loader with a new one, which will be created
  by calling `data_loader_builder` (without argument).
docstr_tok: ["Delete","and","replace","the","current","data","loader","with","a","new","one",",","which","will","be","created","by","calling","`","data_loader_builder","`","(","without","argument",")","."]
code: def reset_data_loader(self, data_loader_builder):
      """
      Delete and replace the current data loader with a new one, which will be created
      by calling `data_loader_builder` (without argument).
      """
      del self.data_loader
      data_loader = data_loader_builder()
      self.data_loader = data_loader
      self._data_loader_iter_obj = None
  
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 4 for calling the SimpleTrainer obj's underlying member method code with example usage: obj.reset_data_loader(data_loader_builder) without return types