{"record":{"id":"f06af8df371b7e5b","repo":"tensorflow/models","slug":"invalid-dataset-received-received-supported","errorCode":null,"errorMessage":"Invalid dataset received. Received: {}. Supported datasets include: {}","messagePattern":"Invalid dataset received\\. Received: (.+?)\\. Supported datasets include: (.+?)","errorType":"exception","errorClass":"KeyError","httpStatus":null,"severity":"error","filePath":"official/legacy/image_classification/configs/configs.py","lineNumber":185,"sourceCode":"  model: base_configs.ModelConfig = dataclasses.field(\n      default_factory=vgg_config.VGGModelConfig\n  )\n\n\ndef get_config(model: str, dataset: str) -> base_configs.ExperimentConfig:\n  \"\"\"Given model and dataset names, return the ExperimentConfig.\"\"\"\n  dataset_model_config_map = {\n      'imagenet': {\n          'efficientnet': EfficientNetImageNetConfig(),\n          'resnet': ResNetImagenetConfig(),\n          'vgg': VGGImagenetConfig(),\n      }\n  }\n  try:\n    return dataset_model_config_map[dataset][model]\n  except KeyError:\n    if dataset not in dataset_model_config_map:\n      raise KeyError('Invalid dataset received. Received: {}. Supported '\n                     'datasets include: {}'.format(\n                         dataset, ', '.join(dataset_model_config_map.keys())))\n    raise KeyError('Invalid model received. Received: {}. Supported models for'\n                   '{} include: {}'.format(\n                       model, dataset,\n                       ', '.join(dataset_model_config_map[dataset].keys())))\n","sourceCodeStart":167,"sourceCodeEnd":192,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/legacy/image_classification/configs/configs.py#L167-L192","documentation":"Lookup guard in get_config: the dataset name is not a key in dataset_model_config_map (only 'imagenet' is registered). The dataset string passed to get_config is unsupported for experiment configuration.","triggerScenarios":"Thrown at official/legacy/image_classification/configs/configs.py:185 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use dataset='imagenet'","Register the desired dataset's config classes in dataset_model_config_map"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e006f5f0d534913e49c1f1dae87364039fa607e2","analyzedAt":"2026-08-24T14:09:15.576Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}