class_docstr: Some common benchmarks that help understand perf bottleneck of a standard dataloader
  made of dataset, mapper and sampler.
class_docstr_tok: ["Some","common","benchmarks","that","help","understand","perf","bottleneck","of","a","standard","dataloader","made","of","dataset",",","mapper","and","sampler","."]
docstr: Benchmark the speed of taking raw samples from the dataset.
docstr_tok: ["Benchmark","the","speed","of","taking","raw","samples","from","the","dataset","."]
code: def benchmark_dataset(self, num_iter, warmup=5):
      """
      Benchmark the speed of taking raw samples from the dataset.
      """
  
      def loader():
          while True:
              for k in self.sampler:
                  yield self.dataset[k]
  
      self._benchmark(loader(), num_iter, warmup, "Dataset Alone")
  
imports: import logging
  import numpy
  from itertools import count
  from typing import List, Tuple
  import torch
  import tqdm
  from fvcore.common.timer import Timer
  from detectron2.utils import comm
  from .build import build_batch_data_loader
  from .common import DatasetFromList, MapDataset
  from .samplers import TrainingSampler
label_desc: Use image node_id 4 for calling the DataLoaderBenchmark obj's underlying member method code with example usage: obj.benchmark_dataset(num_iter, warmup) without return types