class_docstr: `UCF101 <https://www.crcv.ucf.edu/data/UCF101.php/>`_ is an action
  recognition video dataset, and it has 101 classes.
  
  It is built on top of `UCF101 <https://github.com/pytorch/vision/blob/master
  /torchvision/datasets/ucf101.py#L10>`_ dataset class in TorchVision.
class_docstr_tok: ["`","UCF101","<","https",":","\/\/www.crcv.ucf.edu\/data\/UCF101.php\/",">","`","_","is","an","action","recognition","video","dataset",",","and","it","has","101","classes",".","It","is","built","on","top","of","`","UCF101","<","https",":","\/\/github.com\/pytorch\/vision\/blob\/master","\/torchvision\/datasets\/ucf101.py","#","L10",">","`","_","dataset","class","in","TorchVision","."]
docstr: Instantiates a UCF101Dataset from a configuration.
  
  Args:
      config: A configuration for a UCF101Dataset.
          See :func:`__init__` for parameters expected in the config.
  
  Returns:
      A UCF101Dataset instance.
docstr_tok: ["Instantiates","a","UCF101Dataset","from","a","configuration",".","Args",":","config",":","A","configuration","for","a","UCF101Dataset",".","See",":","func",":","`","__init__","`","for","parameters","expected","in","the","config",".","Returns",":","A","UCF101Dataset","instance","."]
code: def from_config(cls, config: Dict[str, Any]) -> "UCF101Dataset":
      """Instantiates a UCF101Dataset from a configuration.
  
      Args:
          config: A configuration for a UCF101Dataset.
              See :func:`__init__` for parameters expected in the config.
  
      Returns:
          A UCF101Dataset instance.
      """
      required_args = [
          "split",
          "metadata_file",
          "video_dir",
          "splits_dir",
      ]
      assert all(
          arg in config for arg in required_args
      ), f"The arguments {required_args} are all required."
  
      split = config["split"]
      (
          transform_config,
          batchsize_per_replica,
          shuffle,
          num_samples,
          frames_per_clip,
          video_width,
          video_height,
          video_min_dimension,
          audio_samples,
          step_between_clips,
          frame_rate,
          clips_per_video,
      ) = cls.parse_config(config)
  
      transform = build_video_field_transform_default(
          transform_config, split
      )
      return cls(
          split,
          batchsize_per_replica,
          shuffle,
          transform,
          num_samples,
          frames_per_clip,
          video_width,
          video_height,
          video_min_dimension,
          audio_samples,
          step_between_clips,
          frame_rate,
          clips_per_video,
          config["video_dir"],
          config["splits_dir"],
          config["fold"]
          if "fold" in config
          else 1,  # UCF101 has 3 folds. Use fold 1 by default
          config["metadata_file"],
      )
  
file_path: ClassyVision/classy_vision/dataset/classy_ucf101.py
imports: import os
  from typing import Any, Callable, Dict, Optional
  import torch
  from torchvision.datasets.ucf101 import UCF101
  from .None import register_dataset
  from .classy_video_dataset import ClassyVideoDataset
  from .transforms.util_video import build_video_field_transform_default
label_desc: Use image node_id 2 for calling the UCF101Dataset obj's underlying member method code with example usage: obj.from_config(cls, config) and returns: cls