open-mmlab/mmdetection · error · NotImplementedError
Not supported YouTubeVIS datasetversion: {dataset_version}
Error message
Not supported YouTubeVIS datasetversion: {dataset_version} What it means
YouTubeVisDataset.set_dataset_classes only accepts dataset_version '2019' or '2021', which select the matching class lists. Any other value raises NotImplementedError.
Source
Thrown at mmdet/datasets/youtube_vis_dataset.py:51
'eagle', 'earless_seal', 'tennis_racket')
classes_2021_version = ('airplane', 'bear', 'bird', 'boat', 'car',
'cat', 'cow', 'deer', 'dog', 'duck',
'earless_seal', 'elephant', 'fish',
'flying_disc', 'fox', 'frog', 'giant_panda',
'giraffe', 'horse', 'leopard', 'lizard',
'monkey', 'motorbike', 'mouse', 'parrot',
'person', 'rabbit', 'shark', 'skateboard',
'snake', 'snowboard', 'squirrel', 'surfboard',
'tennis_racket', 'tiger', 'train', 'truck',
'turtle', 'whale', 'zebra')
if dataset_version == '2019':
cls.METAINFO = dict(classes=classes_2019_version)
elif dataset_version == '2021':
cls.METAINFO = dict(classes=classes_2021_version)
else:
raise NotImplementedError('Not supported YouTubeVIS dataset'
f'version: {dataset_version}')
View on GitHub (pinned to cfd5d3a985)
Solutions
- Use dataset_version='2019' or dataset_version='2021' exactly
- Check the official youtube_vis config under configs/youtube_vis for the exact key
Example fix
# before dataset_version='2022' # after dataset_version='2021'
Defensive patterns
Strategy: validation
Validate before calling
assert dataset_version in ('2019', '2021'), f'bad YouTubeVIS version: {dataset_version}' Type guard
def is_valid_ytvis_version(v):
return v in ('2019', '2021') Prevention
- Use exact version strings from official youtube_vis configs
- Add config schema validation before dataset init
When it happens
Trigger: Instantiating YouTubeVisDataset (or a config with type='YouTubeVisDataset') with dataset_version set to e.g. '2018', '2022', 'v2019', or omitted-but-typo'd values.
Common situations: Typos or assuming newer/older challenge years exist; case-sensitive version strings ('2019' not '2019_version').
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- type must be a str or valid type, but got {type(obj_type)}
- RandomCenterCropPad only support two testing pad mode:logica
- metric should be 'youtube_vis_ap', but got {metric}.
- metric item "{metric_item}" is not supported
- NUM_BRANCHES({num_branches}) != NUM_BLOCKS({len(num_blocks)}
AI-assisted analysis of open-mmlab/mmdetection@cfd5d3a985 (2026-08-27).
Data as JSON: /api/errors/07008ee9f5d9bdfb.
Report an issue: GitHub.