class_docstr: Base class for representing a dataset. Meant to be subclassed, with
  subclasses implementing the `get_model` function. 
class_docstr_tok: ["Base","class","for","representing","a","dataset",".","Meant","to","be","subclassed",",","with","subclasses","implementing","the","`","get_model","`","function","."]
docstr: Args:
      workers (int) : number of workers for data fetching (*required*).
          batch_size (int) : batch size for the data loaders (*required*).
      data_aug (bool) : whether or not to do train data augmentation.
      subset (None|int) : if given, the returned training data loader
          will only use a subset of the training data; this should be a
          number specifying the number of training data points to use.
      subset_start (int) : only used if `subset` is not None; this specifies the
          starting index of the subset.
      subset_type ("rand"|"first"|"last") : only used if `subset is
          not `None`; "rand" selects the subset randomly, "first"
          uses the first `subset` images of the training data, and
          "last" uses the last `subset` images of the training data.
      seed (int) : only used if `subset == "rand"`; allows one to fix
          the random seed used to generate the subset (defaults to 1).
      val_batch_size (None|int) : if not `None`, specifies a
          different batch size for the validation set loader.
      only_val (bool) : If `True`, returns `None` in place of the
          training data loader
      shuffle_train (bool) : Whether or not to shuffle the training data
          in the returned DataLoader.
      shuffle_val (bool) : Whether or not to shuffle the test data in the
          returned DataLoader.
  
  Returns:
      A training loader and validation loader according to the
      parameters given. These are standard PyTorch data loaders, and
      thus can just be used via:
  
      >>> train_loader, val_loader = ds.make_loaders(workers=8, batch_size=128) 
      >>> for im, lab in train_loader:
      >>>     # Do stuff...
docstr_tok: ["Args",":","workers","(","int",")",":","number","of","workers","for","data","fetching","(","*","required","*",")",".","batch_size","(","int",")",":","batch","size","for","the","data","loaders","(","*","required","*",")",".","data_aug","(","bool",")",":","whether","or","not","to","do","train","data","augmentation",".","subset","(","None|int",")",":","if","given",",","the","returned","training","data","loader","will","only","use","a","subset","of","the","training","data",";","this","should","be","a","number","specifying","the","number","of","training","data","points","to","use",".","subset_start","(","int",")",":","only","used","if","`","subset","`","is","not","None",";","this","specifies","the","starting","index","of","the","subset",".","subset_type","(","``","rand","''","|","''","first","''","|","''","last","''",")",":","only","used","if","`","subset","is","not","`","None","`",";","``","rand","''","selects","the","subset","randomly",",","``","first","''","uses","the","first","`","subset","`","images","of","the","training","data",",","and","``","last","''","uses","the","last","`","subset","`","images","of","the","training","data",".","seed","(","int",")",":","only","used","if","`","subset","==","``","rand","''","`",";","allows","one","to","fix","the","random","seed","used","to","generate","the","subset","(","defaults","to","1",")",".","val_batch_size","(","None|int",")",":","if","not","`","None","`",",","specifies","a","different","batch","size","for","the","validation","set","loader",".","only_val","(","bool",")",":","If","`","True","`",",","returns","`","None","`","in","place","of","the","training","data","loader","shuffle_train","(","bool",")",":","Whether","or","not","to","shuffle","the","training","data","in","the","returned","DataLoader",".","shuffle_val","(","bool",")",":","Whether","or","not","to","shuffle","the","test","data","in","the","returned","DataLoader",".","Returns",":","A","training","loader","and","validation","loader","according","to","the","parameters","given",".","These","are","standard","PyTorch","data","loaders",",","and","thus","can","just","be","used","via",":",">",">",">","train_loader",",","val_loader","=","ds.make_loaders","(","workers=8",",","batch_size=128",")",">",">",">","for","im",",","lab","in","train_loader",":",">",">",">","#","Do","stuff","..."]
code: def make_loaders(
      self,
      workers,
      batch_size,
      data_aug=True,
      subset=None,
      subset_start=0,
      subset_type="rand",
      val_batch_size=None,
      only_val=False,
      shuffle_train=True,
      shuffle_val=True,
      subset_seed=None,
  ):
      """
      Args:
          workers (int) : number of workers for data fetching (*required*).
              batch_size (int) : batch size for the data loaders (*required*).
          data_aug (bool) : whether or not to do train data augmentation.
          subset (None|int) : if given, the returned training data loader
              will only use a subset of the training data; this should be a
              number specifying the number of training data points to use.
          subset_start (int) : only used if `subset` is not None; this specifies the
              starting index of the subset.
          subset_type ("rand"|"first"|"last") : only used if `subset is
              not `None`; "rand" selects the subset randomly, "first"
              uses the first `subset` images of the training data, and
              "last" uses the last `subset` images of the training data.
          seed (int) : only used if `subset == "rand"`; allows one to fix
              the random seed used to generate the subset (defaults to 1).
          val_batch_size (None|int) : if not `None`, specifies a
              different batch size for the validation set loader.
          only_val (bool) : If `True`, returns `None` in place of the
              training data loader
          shuffle_train (bool) : Whether or not to shuffle the training data
              in the returned DataLoader.
          shuffle_val (bool) : Whether or not to shuffle the test data in the
              returned DataLoader.
  
      Returns:
          A training loader and validation loader according to the
          parameters given. These are standard PyTorch data loaders, and
          thus can just be used via:
  
          >>> train_loader, val_loader = ds.make_loaders(workers=8, batch_size=128)
          >>> for im, lab in train_loader:
          >>>     # Do stuff...
      """
      transforms = (self.transform_train, self.transform_test)
      return loaders.make_loaders(
          workers=workers,
          batch_size=batch_size,
          transforms=transforms,
          data_path=self.data_path,
          data_aug=data_aug,
          dataset=self.ds_name,
          label_mapping=self.label_mapping,
          custom_class=self.custom_class,
          val_batch_size=val_batch_size,
          subset=subset,
          subset_start=subset_start,
          subset_type=subset_type,
          only_val=only_val,
          seed=subset_seed,
          shuffle_train=shuffle_train,
          shuffle_val=shuffle_val,
          custom_class_args=self.custom_class_args,
      )
  
imports: import pathlib
  import torch
  import torch.utils.data
  from .None import imagenet_models, cifar_models
  from torchvision import transforms, datasets
  from .tools import constants
  from .tools import openimgs_helpers
  from .None import data_augmentation
  from .None import loaders
  from .tools.helpers import get_label_mapping
label_desc: Use image node_id 4 for calling the DataSet obj's underlying member method code with example usage: obj.make_loaders(workers, batch_size, data_aug, subset, subset_start, subset_type, val_batch_size, only_val, shuffle_train, shuffle_val, subset_seed) and returns: loaders