class_docstr: "Configuration for Youtube-vis video instance segmentation dataset.
  
  Attributes:
    height: An optional integer height to resize all videos to. If None, no
      resizing will occur.
    width: An optional integer width to resize all videos to. If None, no
      resizing will occur.
    only_frames_with_labels: A bool indicating whether we should include only
      frames which have labels (True) or whether all frames, including those
      without labels, should be included (False).
docstr: The parameters specifying how the dataset will be processed.
  
  This allows the option to preprocess the images to a smaller fixed
  resolution. If height and width are left as None, the native size
  will be used. It also allows dropping all frames which don't include
  labels.
  
  Args:
    height: optional height to resize all images to
    width: optional width to resize all images to
    only_frames_with_labels: whether or not to include the frames which don't
      have labels in the data export.
    split_train_data_range: If not None, must be a tuple of two integers
      indicating the slice (left-inclusive, right-exclusive) of the train data
      to subsample into a manufactured training split. Because the default
      validation and test splits contain no labels, this allows for validation
      and testing without uploading to the youtube_vis third party servers.
    split_val_data_range: If not None, must be a tuple of integers indicating
      the slice (left-inclusive, right-exclusive) of the train data to
      subsample into a manufactured validation split. Because the default
      validation and test splits contain no labels, this allows for validation
      and testing without uploading to the youtube_vis third party servers.
    split_test_data_range: If not None, must be a tuple of integers indicating
      the slice (left-inclusive, right-exclusive) of the train data to
      subsample into a manufactured test split. Because the default validation
      and test splits contain no labels, this allows for validation and
      testing without uploading to the youtube_vis third party servers.
    **kwargs: Passed on to the constructor of `BuilderConfig`.
  
  Raises:
    ValueError if split data ranges are outside of acceptable values.
docstr_tok: ["The","parameters","specifying","how","the","dataset","will","be","processed",".","This","allows","the","option","to","preprocess","the","images","to","a","smaller","fixed","resolution",".","If","height","and","width","are","left","as","None",",","the","native","size","will","be","used",".","It","also","allows","dropping","all","frames","which","do","n't","include","labels",".","Args",":","height",":","optional","height","to","resize","all","images","to","width",":","optional","width","to","resize","all","images","to","only_frames_with_labels",":","whether","or","not","to","include","the","frames","which","don't","have","labels","in","the","data","export",".","split_train_data_range",":","If","not","None",",","must","be","a","tuple","of","two","integers","indicating","the","slice","(","left-inclusive",",","right-exclusive",")","of","the","train","data","to","subsample","into","a","manufactured","training","split",".","Because","the","default","validation","and","test","splits","contain","no","labels",",","this","allows","for","validation","and","testing","without","uploading","to","the","youtube_vis","third","party","servers",".","split_val_data_range",":","If","not","None",",","must","be","a","tuple","of","integers","indicating","the","slice","(","left-inclusive",",","right-exclusive",")","of","the","train","data","to","subsample","into","a","manufactured","validation","split",".","Because","the","default","validation","and","test","splits","contain","no","labels",",","this","allows","for","validation","and","testing","without","uploading","to","the","youtube_vis","third","party","servers",".","split_test_data_range",":","If","not","None",",","must","be","a","tuple","of","integers","indicating","the","slice","(","left-inclusive",",","right-exclusive",")","of","the","train","data","to","subsample","into","a","manufactured","test","split",".","Because","the","default","validation","and","test","splits","contain","no","labels",",","this","allows","for","validation","and","testing","without","uploading","to","the","youtube_vis","third","party","servers",".","*","*","kwargs",":","Passed","on","to","the","constructor","of","`","BuilderConfig","`",".","Raises",":","ValueError","if","split","data","ranges","are","outside","of","acceptable","values","."]
code: def __init__(
      self,
      *,
      height: Optional[int] = None,
      width: Optional[int] = None,
      only_frames_with_labels: bool = False,
      split_train_data_range: Optional[Tuple[int, int]] = None,
      split_val_data_range: Optional[Tuple[int, int]] = None,
      split_test_data_range: Optional[Tuple[int, int]] = None,
      **kwargs,
  ):
      """The parameters specifying how the dataset will be processed.
  
      This allows the option to preprocess the images to a smaller fixed
      resolution. If height and width are left as None, the native size
      will be used. It also allows dropping all frames which don't include
      labels.
  
      Args:
        height: optional height to resize all images to
        width: optional width to resize all images to
        only_frames_with_labels: whether or not to include the frames which don't
          have labels in the data export.
        split_train_data_range: If not None, must be a tuple of two integers
          indicating the slice (left-inclusive, right-exclusive) of the train data
          to subsample into a manufactured training split. Because the default
          validation and test splits contain no labels, this allows for validation
          and testing without uploading to the youtube_vis third party servers.
        split_val_data_range: If not None, must be a tuple of integers indicating
          the slice (left-inclusive, right-exclusive) of the train data to
          subsample into a manufactured validation split. Because the default
          validation and test splits contain no labels, this allows for validation
          and testing without uploading to the youtube_vis third party servers.
        split_test_data_range: If not None, must be a tuple of integers indicating
          the slice (left-inclusive, right-exclusive) of the train data to
          subsample into a manufactured test split. Because the default validation
          and test splits contain no labels, this allows for validation and
          testing without uploading to the youtube_vis third party servers.
        **kwargs: Passed on to the constructor of `BuilderConfig`.
  
      Raises:
        ValueError if split data ranges are outside of acceptable values.
      """
      super(YoutubeVisConfig, self).__init__(**kwargs)
      if height is not None or width is not None:
          if height is None or width is None:
              raise ValueError(
                  "Provide either both height and width or None."
              )
      self.height = height
      self.width = width
      self.only_frames_with_labels = only_frames_with_labels
      # Check that the requested data falls within the allowed ranges.
      # NOTE(austinstone): We do not check that the split data is non-overlapping.
      # The user should ensure that their splits are not-overlapping to prevent
      # training on the test data.
      if split_train_data_range is not None:
          if (
              split_train_data_range[0] < 0
              or split_train_data_range[1] > NUM_TRAIN_EXAMPLES
          ):
              raise ValueError(
                  f"split_train_data_range must be within [0, {NUM_TRAIN_EXAMPLES}] ",
                  f"got instead: {split_train_data_range}.",
              )
      if split_val_data_range is not None:
          if (
              split_val_data_range[0] < 0
              or split_val_data_range[1] > NUM_TRAIN_EXAMPLES
          ):
              raise ValueError(
                  f"split_val_data_range must be within [0, {NUM_TRAIN_EXAMPLES}] ",
                  f"got instead: {split_val_data_range}.",
              )
      if split_test_data_range is not None:
          if (
              split_test_data_range[0] < 0
              or split_test_data_range[1] > NUM_TRAIN_EXAMPLES
          ):
              raise ValueError(
                  f"split_test_data_range must be within [0, {NUM_TRAIN_EXAMPLES}] ",
                  f"got instead: {split_test_data_range}.",
              )
      self.split_train_data_range = split_train_data_range
      self.split_val_data_range = split_val_data_range
      self.split_test_data_range = split_test_data_range
  
imports: from __future__ import annotations
  import collections
  import json
  import os
  from typing import Any, Dict, List, Optional, Tuple, Union
  from etils import epath
  import numpy
  import tensorflow_datasets.public_api
label_desc: Use image node_id 1 to create a new YoutubeVisConfig object from inherited base classes: tfds.core with example: obj = YoutubeVisConfig()