class_docstr: DataLoader is meant to contain a user's ``Dataset``, configuration for
  sampling data in batches, and performance configuration like
  multiprocessing.
  
  The __init__ function determines the defaults in the same way as a
  ``torch.utils.data.DataLoader`` would, so the behavior should be familiar.
  However, the ``torch.utils.data.Dataloader`` that is used for training and
  validation is not created until ``get_data_loader(...)`` is called. This is
  done so that Determined can ensure that sampling restarts from the right location
  and distributed sampling is handled correctly.
  
  Note that the arguments are from PyTorch.
  
  Arguments:
      dataset (Dataset): dataset from which to load the data.
      batch_size (int, optional): how many samples per batch to load (default: ``1``).
      shuffle (bool, optional): set to ``True`` to have the data reshuffled
          at every epoch (default: ``False``).
      sampler (Sampler, optional): defines the strategy to draw samples from
          the dataset. If specified, :attr:`shuffle` must be ``False``.
      batch_sampler (Sampler, optional): like :attr:`sampler`, but returns a batch of
          indices at a time. Mutually exclusive with :attr:`batch_size`,
          :attr:`shuffle`, :attr:`sampler`, and :attr:`drop_last`.
      num_workers (int, optional): how many subprocesses to use for data
          loading. ``0`` means that the data will be loaded in the main process.
          (default: ``0``)
      collate_fn (callable, optional): merges a list of samples to form a
          mini-batch of Tensor(s).  Used when using batched loading from a
          map-style dataset.
      pin_memory (bool, optional): If ``True``, the data loader will copy Tensors
          into CUDA pinned memory before returning them.  If your data elements
          are a custom type, or your :attr:`collate_fn` returns a batch that is a custom type,
          see the example below.
      drop_last (bool, optional): set to ``True`` to drop the last incomplete batch,
          if the dataset size is not divisible by the batch size. If ``False`` and
          the size of dataset is not divisible by the batch size, then the last batch
          will be smaller. (default: ``False``)
      timeout (numeric, optional): if positive, the timeout value for collecting a batch
          from workers. Should always be non-negative. (default: ``0``)
      worker_init_fn (callable, optional): If not ``None``, this will be called on each
          worker subprocess with the worker id (an int in ``[0, num_workers - 1]``) as
          input, after seeding and before data loading. (default: ``None``)
      generator (torch.Generator, optional): If not ``None``, this RNG will be used
          by RandomSampler to generate random indexes and multiprocessing to generate
          ``base_seed`` for workers. (default: ``None``)
      prefetch_factor (int, optional, keyword-only arg): Number of samples loaded
          in advance by each worker. ``2`` means there will be a total of
          2 * num_workers samples prefetched across all workers. (default: ``2``)
      persistent_workers (bool, optional): If ``True``, the data loader will not shut down
          the worker processes after a dataset has been consumed once. This allows to
          maintain the workers ``Dataset`` instances alive. (default: ``False``)
class_docstr_tok: ["DataLoader","is","meant","to","contain","a","user","'s","``","Dataset","``",",","configuration","for","sampling","data","in","batches",",","and","performance","configuration","like","multiprocessing",".","The","__init__","function","determines","the","defaults","in","the","same","way","as","a","``","torch.utils.data.DataLoader","``","would",",","so","the","behavior","should","be","familiar",".","However",",","the","``","torch.utils.data.Dataloader","``","that","is","used","for","training","and","validation","is","not","created","until","``","get_data_loader","(","...",")","``","is","called",".","This","is","done","so","that","Determined","can","ensure","that","sampling","restarts","from","the","right","location","and","distributed","sampling","is","handled","correctly",".","Note","that","the","arguments","are","from","PyTorch",".","Arguments",":","dataset","(","Dataset",")",":","dataset","from","which","to","load","the","data",".","batch_size","(","int",",","optional",")",":","how","many","samples","per","batch","to","load","(","default",":","``","1","``",")",".","shuffle","(","bool",",","optional",")",":","set","to","``","True","``","to","have","the","data","reshuffled","at","every","epoch","(","default",":","``","False","``",")",".","sampler","(","Sampler",",","optional",")",":","defines","the","strategy","to","draw","samples","from","the","dataset",".","If","specified",",",":","attr",":","`","shuffle","`","must","be","``","False","``",".","batch_sampler","(","Sampler",",","optional",")",":","like",":","attr",":","`","sampler","`",",","but","returns","a","batch","of","indices","at","a","time",".","Mutually","exclusive","with",":","attr",":","`","batch_size","`",",",":","attr",":","`","shuffle","`",",",":","attr",":","`","sampler","`",",","and",":","attr",":","`","drop_last","`",".","num_workers","(","int",",","optional",")",":","how","many","subprocesses","to","use","for","data","loading",".","``","0","``","means","that","the","data","will","be","loaded","in","the","main","process",".","(","default",":","``","0","``",")","collate_fn","(","callable",",","optional",")",":","merges","a","list","of","samples","to","form","a","mini-batch","of","Tensor","(","s",")",".","Used","when","using","batched","loading","from","a","map-style","dataset",".","pin_memory","(","bool",",","optional",")",":","If","``","True","``",",","the","data","loader","will","copy","Tensors","into","CUDA","pinned","memory","before","returning","them",".","If","your","data","elements","are","a","custom","type",",","or","your",":","attr",":","`","collate_fn","`","returns","a","batch","that","is","a","custom","type",",","see","the","example","below",".","drop_last","(","bool",",","optional",")",":","set","to","``","True","``","to","drop","the","last","incomplete","batch",",","if","the","dataset","size","is","not","divisible","by","the","batch","size",".","If","``","False","``","and","the","size","of","dataset","is","not","divisible","by","the","batch","size",",","then","the","last","batch","will","be","smaller",".","(","default",":","``","False","``",")","timeout","(","numeric",",","optional",")",":","if","positive",",","the","timeout","value","for","collecting","a","batch","from","workers",".","Should","always","be","non-negative",".","(","default",":","``","0","``",")","worker_init_fn","(","callable",",","optional",")",":","If","not","``","None","``",",","this","will","be","called","on","each","worker","subprocess","with","the","worker","id","(","an","int","in","``","[","0",",","num_workers","-","1","]","``",")","as","input",",","after","seeding","and","before","data","loading",".","(","default",":","``","None","``",")","generator","(","torch.Generator",",","optional",")",":","If","not","``","None","``",",","this","RNG","will","be","used","by","RandomSampler","to","generate","random","indexes","and","multiprocessing","to","generate","``","base_seed","``","for","workers",".","(","default",":","``","None","``",")","prefetch_factor","(","int",",","optional",",","keyword-only","arg",")",":","Number","of","samples","loaded","in","advance","by","each","worker",".","``","2","``","means","there","will","be","a","total","of","2","*","num_workers","samples","prefetched","across","all","workers",".","(","default",":","``","2","``",")","persistent_workers","(","bool",",","optional",")",":","If","``","True","``",",","the","data","loader","will","not","shut","down","the","worker","processes","after","a","dataset","has","been","consumed","once",".","This","allows","to","maintain","the","workers","``","Dataset","``","instances","alive",".","(","default",":","``","False","``",")"]
code: def _auto_collation(self) -> bool:
      return self.batch_sampler is not None
  
file_path: determined/harness/determined/pytorch/_data.py
imports: import logging
  from typing import Any, Callable, Dict, Iterator, List, Optional, Sequence, Set, Type, TypeVar, Union, cast
  import numpy
  import torch
  from packaging import version
  from torch.utils.data import BatchSampler, Dataset, RandomSampler, Sampler, SequentialSampler, _utils
  from determined.pytorch import samplers
label_desc: Use image node_id 2 for calling the DataLoader obj's underlying member method code with example usage: obj._auto_collation() and returns: unknown