class_docstr: Default implementation of DataLoaderMapProviderBase.
  
  If a dataset returns batches from get_eval_batches(), then
  they will be what the corresponding dataloader returns,
  independently of any of the fields on this class.
  
  If conditioning is not required, then the batch size should
  be set as 1, and most of the fields do not matter.
  
  If conditioning is required, each batch will contain one main
  frame first to predict and the, rest of the elements are for
  conditioning.
  
  If images_per_seq_options is left empty, the conditioning
  frames are picked according to the conditioning type given.
  This does not have regard to the order of frames in a
  scene, or which frames belong to what scene.
  
  If images_per_seq_options is given, then the conditioning types
  must be SAME and the remaining fields are used.
  
  Members:
      batch_size: The size of the batch of the data loader.
      num_workers: Number of data-loading threads in each data loader.
      dataset_length_train: The number of batches in a training epoch. Or 0 to mean
          an epoch is the length of the training set.
      dataset_length_val: The number of batches in a validation epoch. Or 0 to mean
          an epoch is the length of the validation set.
      dataset_length_test: The number of batches in a testing epoch. Or 0 to mean
          an epoch is the length of the test set.
      train_conditioning_type: Whether the train data loader should use
          only known frames for conditioning.
          Only used if batch_size>1 and train dataset is
          present and does not return eval_batches.
      val_conditioning_type: Whether the val data loader should use
          training frames or known frames for conditioning.
          Only used if batch_size>1 and val dataset is
          present and does not return eval_batches.
      test_conditioning_type: Whether the test data loader should use
          training frames or known frames for conditioning.
          Only used if batch_size>1 and test dataset is
          present and does not return eval_batches.
      images_per_seq_options: Possible numbers of frames sampled per sequence in a batch.
          If a conditioning_type is KNOWN or TRAIN, then this must be left at its initial
          value. Empty (the default) means that we are not careful about which frames
          come from which scene.
      sample_consecutive_frames: if True, will sample a contiguous interval of frames
          in the sequence. It first sorts the frames by timestimps when available,
          otherwise by frame numbers, finds the connected segments within the sequence
          of sufficient length, then samples a random pivot element among them and
          ideally uses it as a middle of the temporal window, shifting the borders
          where necessary. This strategy mitigates the bias against shorter segments
          and their boundaries.
      consecutive_frames_max_gap: if a number > 0, then used to define the maximum
          difference in frame_number of neighbouring frames when forming connected
          segments; if both this and consecutive_frames_max_gap_seconds are 0s,
          the whole sequence is considered a segment regardless of frame numbers.
      consecutive_frames_max_gap_seconds: if a number > 0.0, then used to define the
          maximum difference in frame_timestamp of neighbouring frames when forming
          connected segments; if both this and consecutive_frames_max_gap are 0s,
          the whole sequence is considered a segment regardless of frame timestamps.
class_docstr_tok: ["Default","implementation","of","DataLoaderMapProviderBase",".","If","a","dataset","returns","batches","from","get_eval_batches","(",")",",","then","they","will","be","what","the","corresponding","dataloader","returns",",","independently","of","any","of","the","fields","on","this","class",".","If","conditioning","is","not","required",",","then","the","batch","size","should","be","set","as","1",",","and","most","of","the","fields","do","not","matter",".","If","conditioning","is","required",",","each","batch","will","contain","one","main","frame","first","to","predict","and","the",",","rest","of","the","elements","are","for","conditioning",".","If","images_per_seq_options","is","left","empty",",","the","conditioning","frames","are","picked","according","to","the","conditioning","type","given",".","This","does","not","have","regard","to","the","order","of","frames","in","a","scene",",","or","which","frames","belong","to","what","scene",".","If","images_per_seq_options","is","given",",","then","the","conditioning","types","must","be","SAME","and","the","remaining","fields","are","used",".","Members",":","batch_size",":","The","size","of","the","batch","of","the","data","loader",".","num_workers",":","Number","of","data-loading","threads","in","each","data","loader",".","dataset_length_train",":","The","number","of","batches","in","a","training","epoch",".","Or","0","to","mean","an","epoch","is","the","length","of","the","training","set",".","dataset_length_val",":","The","number","of","batches","in","a","validation","epoch",".","Or","0","to","mean","an","epoch","is","the","length","of","the","validation","set",".","dataset_length_test",":","The","number","of","batches","in","a","testing","epoch",".","Or","0","to","mean","an","epoch","is","the","length","of","the","test","set",".","train_conditioning_type",":","Whether","the","train","data","loader","should","use","only","known","frames","for","conditioning",".","Only","used","if","batch_size",">","1","and","train","dataset","is","present","and","does","not","return","eval_batches",".","val_conditioning_type",":","Whether","the","val","data","loader","should","use","training","frames","or","known","frames","for","conditioning",".","Only","used","if","batch_size",">","1","and","val","dataset","is","present","and","does","not","return","eval_batches",".","test_conditioning_type",":","Whether","the","test","data","loader","should","use","training","frames","or","known","frames","for","conditioning",".","Only","used","if","batch_size",">","1","and","test","dataset","is","present","and","does","not","return","eval_batches",".","images_per_seq_options",":","Possible","numbers","of","frames","sampled","per","sequence","in","a","batch",".","If","a","conditioning_type","is","KNOWN","or","TRAIN",",","then","this","must","be","left","at","its","initial","value",".","Empty","(","the","default",")","means","that","we","are","not","careful","about","which","frames","come","from","which","scene",".","sample_consecutive_frames",":","if","True",",","will","sample","a","contiguous","interval","of","frames","in","the","sequence",".","It","first","sorts","the","frames","by","timestimps","when","available",",","otherwise","by","frame","numbers",",","finds","the","connected","segments","within","the","sequence","of","sufficient","length",",","then","samples","a","random","pivot","element","among","them","and","ideally","uses","it","as","a","middle","of","the","temporal","window",",","shifting","the","borders","where","necessary",".","This","strategy","mitigates","the","bias","against","shorter","segments","and","their","boundaries",".","consecutive_frames_max_gap",":","if","a","number",">","0",",","then","used","to","define","the","maximum","difference","in","frame_number","of","neighbouring","frames","when","forming","connected","segments",";","if","both","this","and","consecutive_frames_max_gap_seconds","are","0s",",","the","whole","sequence","is","considered","a","segment","regardless","of","frame","numbers",".","consecutive_frames_max_gap_seconds",":","if","a","number",">","0.0",",","then","used","to","define","the","maximum","difference","in","frame_timestamp","of","neighbouring","frames","when","forming","connected","segments",";","if","both","this","and","consecutive_frames_max_gap","are","0s",",","the","whole","sequence","is","considered","a","segment","regardless","of","frame","timestamps","."]
docstr: Returns a collection of data loaders for a given collection of datasets.
docstr_tok: ["Returns","a","collection","of","data","loaders","for","a","given","collection","of","datasets","."]
code: def get_data_loader_map(self, datasets: DatasetMap) -> DataLoaderMap:
      """
      Returns a collection of data loaders for a given collection of datasets.
      """
      return DataLoaderMap(
          train=self._make_data_loader(
              datasets.train,
              self.dataset_length_train,
              datasets.train,
              self.train_conditioning_type,
          ),
          val=self._make_data_loader(
              datasets.val,
              self.dataset_length_val,
              datasets.train,
              self.val_conditioning_type,
          ),
          test=self._make_data_loader(
              datasets.test,
              self.dataset_length_test,
              datasets.train,
              self.test_conditioning_type,
          ),
      )
  
imports: from dataclasses import dataclass
  from enum import Enum
  from typing import Iterator, List, Optional, Tuple
  import torch
  from pytorch3d.implicitron.tools.config import registry, ReplaceableBase
  from torch.utils.data import BatchSampler, ConcatDataset, DataLoader, RandomSampler, Sampler
  from .dataset_base import DatasetBase
  from .dataset_map_provider import DatasetMap
  from .frame_data import FrameData
  from .scene_batch_sampler import SceneBatchSampler
  from .utils import is_known_frame_scalar
label_desc: Use image node_id 1 for calling the SequenceDataLoaderMapProvider obj's underlying member method code with example usage: obj.get_data_loader_map(datasets) and returns: DataLoaderMap