{"record":{"id":"76507ed9e69bbdfa","repo":"tensorflow/models","slug":"configuration-root-in-yaml-path-must-be-a-dictio","errorCode":null,"errorMessage":"Configuration root in {yaml_path} must be a dictionary.","messagePattern":"Configuration root in (.+?) must be a dictionary\\.","errorType":"exception","errorClass":"ConfigurationError","httpStatus":null,"severity":"error","filePath":"official/projects/waste_identification_ml/model_inference_with_tracking/sam3_dinov3_tracking_pipeline/config_loader.py","lineNumber":355,"sourceCode":"\n    Raises:\n      ConfigurationError: If the YAML file cannot be found, if the file content\n        is invalid YAML, or if configuration validation fails.\n    \"\"\"\n    try:\n      with open(yaml_path, \"r\", encoding=\"utf-8\") as file:\n        data = yaml.safe_load(file)\n    except OSError as err:\n      raise ConfigurationError(\n          f\"Config file not found or inaccessible: {yaml_path}\"\n      ) from err\n    except yaml.YAMLError as err:\n      raise ConfigurationError(\n          f\"Invalid YAML syntax in {yaml_path}: {err}\"\n      ) from err\n\n    if not isinstance(data, dict):\n      raise ConfigurationError(\n          f\"Configuration root in {yaml_path} must be a dictionary.\"\n      )\n\n    try:\n      prompt_configs = {}\n      for name, cfg in data[\"detection\"][\"configs\"].items():\n        cfg_copy = dict(cfg)\n        if \"crop_size\" in cfg_copy:\n          cfg_copy[\"crop_size\"] = tuple(cfg_copy[\"crop_size\"])\n        prompt_configs[name] = PromptConfig(**cfg_copy)\n\n      classes = list(data[\"classes\"])\n      collapsed_categories = build_collapsed_categories_config(\n          raw_section=data.get(\"collapsed_categories\"),\n          classes=classes,\n      )\n\n      models_data = data[\"models\"]","sourceCodeStart":337,"sourceCodeEnd":373,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/projects/waste_identification_ml/model_inference_with_tracking/sam3_dinov3_tracking_pipeline/config_loader.py#L337-L373","documentation":"Error \"Configuration root in {yaml_path} must be a dictionary.\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/projects/waste_identification_ml/model_inference_with_tracking/sam3_dinov3_tracking_pipeline/config_loader.py:355 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e006f5f0d534913e49c1f1dae87364039fa607e2","analyzedAt":"2026-08-24T14:09:15.576Z","schemaVersion":2},"datasetVersion":"2026-08-24T17:17:21.512Z"}