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

        Delete and replace the current data loader with a new one, which will be created
        by calling `data_loader_builder` (without argument).
        
ControlNet-v1-1-nightly/annotator/oneformer/detectron2/engine/train_loop.py