class_docstr: Class representing a dataset abstraction.
  
  This class wraps a :class:`torch.utils.data.Dataset` via the `dataset` attribute
  and configures the dataloaders needed to access the datasets. By default,
  this class will use `DEFAULT_NUM_WORKERS` processes to load the data
  (num_workers in :class:`torch.utils.data.DataLoader`).
  Transforms which need to be applied to the data should be specified in this class.
  ClassyDataset can be instantiated from a configuration file as well.
class_docstr_tok: ["Class","representing","a","dataset","abstraction",".","This","class","wraps","a",":","class",":","`","torch.utils.data.Dataset","`","via","the","`","dataset","`","attribute","and","configures","the","dataloaders","needed","to","access","the","datasets",".","By","default",",","this","class","will","use","`","DEFAULT_NUM_WORKERS","`","processes","to","load","the","data","(","num_workers","in",":","class",":","`","torch.utils.data.DataLoader","`",")",".","Transforms","which","need","to","be","applied","to","the","data","should","be","specified","in","this","class",".","ClassyDataset","can","be","instantiated","from","a","configuration","file","as","well","."]
docstr: This function parses out common config options.
  
  Args:
      config: A dict with the following string keys -
  
          | *batchsize_per_replica* (int): Must be a positive int, batch size
          |    for each replica
          | *use_shuffle* (bool): Whether to enable shuffling for the dataset
          | *num_samples* (int, optional): When set, restricts the number of
               samples in a dataset
          | *transforms*: list of tranform configurations to be applied in order
  
  Returns:
      A tuple containing the following variables -
          | *transform_config*: Config for the dataset transform. Can be passed to
          |    :func:`transforms.build_transform`
          | *batchsize_per_replica*: Batch size per replica
          | *shuffle*: Whether we should shuffle between epochs
          | *num_samples*: When set, restricts the number of samples in a dataset
docstr_tok: ["This","function","parses","out","common","config","options",".","Args",":","config",":","A","dict","with","the","following","string","keys","-","|","*","batchsize_per_replica","*","(","int",")",":","Must","be","a","positive","int",",","batch","size","|","for","each","replica","|","*","use_shuffle","*","(","bool",")",":","Whether","to","enable","shuffling","for","the","dataset","|","*","num_samples","*","(","int",",","optional",")",":","When","set",",","restricts","the","number","of","samples","in","a","dataset","|","*","transforms","*",":","list","of","tranform","configurations","to","be","applied","in","order","Returns",":","A","tuple","containing","the","following","variables","-","|","*","transform_config","*",":","Config","for","the","dataset","transform",".","Can","be","passed","to","|",":","func",":","`","transforms.build_transform","`","|","*","batchsize_per_replica","*",":","Batch","size","per","replica","|","*","shuffle","*",":","Whether","we","should","shuffle","between","epochs","|","*","num_samples","*",":","When","set",",","restricts","the","number","of","samples","in","a","dataset"]
code: def parse_config(cls, config: Dict[str, Any]):
      """
      This function parses out common config options.
  
      Args:
          config: A dict with the following string keys -
  
              | *batchsize_per_replica* (int): Must be a positive int, batch size
              |    for each replica
              | *use_shuffle* (bool): Whether to enable shuffling for the dataset
              | *num_samples* (int, optional): When set, restricts the number of
                   samples in a dataset
              | *transforms*: list of tranform configurations to be applied in order
  
      Returns:
          A tuple containing the following variables -
              | *transform_config*: Config for the dataset transform. Can be passed to
              |    :func:`transforms.build_transform`
              | *batchsize_per_replica*: Batch size per replica
              | *shuffle*: Whether we should shuffle between epochs
              | *num_samples*: When set, restricts the number of samples in a dataset
      """
      batchsize_per_replica = config.get("batchsize_per_replica")
      shuffle = config.get("use_shuffle")
      num_samples = config.get("num_samples")
      transform_config = config.get("transforms")
      return (
          transform_config,
          batchsize_per_replica,
          shuffle,
          num_samples,
      )
  
file_path: ClassyVision/classy_vision/dataset/classy_dataset.py
imports: from typing import Any, Callable, Dict, Optional, Sequence, Union
  from classy_vision.dataset.transforms import ClassyTransform
  from classy_vision.generic.distributed_util import get_rank, get_world_size
  from classy_vision.generic.util import is_pos_int, log_class_usage
  from torch.utils.data import DataLoader
  from torch.utils.data.distributed import DistributedSampler
label_desc: Use image node_id 3 for calling the ClassyDataset obj's underlying member method code with example usage: obj.parse_config(cls, config) and returns: transform_config,  batchsize_per_replica,  shuffle,  num_samples