tensorflow/models · error · ValueError

Invalid subset "{subset}". The available subsets are: {self.

Error message

Invalid subset "{subset}". The available subsets are: {self._SUBSETS}

What it means

Error "Invalid subset "{subset}". The available subsets are: {self._SUBSETS}" thrown in tensorflow/models.

Source

Thrown at official/projects/videoglue/datasets/action_localization.py:52

  _SUBSETS = ('train', 'test')

  _KEYFRAME_INDEX_KEY = 'clip/key_frame/frame_index'
  _GT_PREFIX = 'clip/key_frame'
  _DETECTOR_PREFIX = 'centernet'
  _ZERO_BASED_INDEX = False  # whether the labels are 0-indexed in the table.
  # threshold to be applied for filtering detected boxes.
  _TRAIN_DETECTION_SCORE = 0.9
  _EVAL_DETECTION_SCORE = 0.8

  _NUM_CLASSES = 80

  def __init__(
      self,
      subset: str = 'train'):
    """Initializes the factory."""

    if subset not in self._SUBSETS:
      raise ValueError(f'Invalid subset "{subset}".'
                       f' The available subsets are: {self._SUBSETS}')

    table_name = os.path.join(self._BASE_DIR, self._TABLES[subset])
    shards = utils.get_shards(table_name)

    super().__init__(shards)

  def _build(self,
             is_training: bool = True,
             # Video related parameters.
             num_frames: int = 32,
             temporal_stride: int = 1,
             num_instance_per_frame: int = 5,
             # Image related parameters.
             min_resize: int = 224,
             crop_size: int = 200,
             zero_centering_image: bool = False,
             color_augmentation: bool = False,

View on GitHub (pinned to e006f5f0d5)

When it happens

Trigger: Thrown at official/projects/videoglue/datasets/action_localization.py:52 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of tensorflow/models@e006f5f0d5 (2026-08-24). Data as JSON: /api/errors/ea3f4e666e24df56. Report an issue: GitHub.