{"record":{"id":"f422f9fc503d8a00","repo":"tensorflow/models","slug":"config-file-is-not-valid-yaml-error","errorCode":null,"errorMessage":"Config file is not valid YAML: {error}","messagePattern":"Config file is not valid YAML: (.+?)","errorType":"exception","errorClass":"ConfigError","httpStatus":null,"severity":"error","filePath":"official/projects/waste_identification_ml/data_generation/auto_labeler_pipeline/config_loader.py","lineNumber":663,"sourceCode":"\n  Returns:\n      A validated :class:`PipelineConfig`.\n\n  Raises:\n      ConfigError: If the file is missing, is not valid YAML, is missing\n          required fields, contains out-of-range values, or names a\n          ``prompt_to_detect`` that has no block under ``prompts``.\n  \"\"\"\n  if not os.path.isfile(config_path):\n    raise ConfigError(f\"Config file does not exist: {config_path}\")\n\n  try:\n    with open(config_path, \"r\", encoding=\"utf-8\") as config_file:\n      raw_config = yaml.safe_load(config_file)\n  except OSError as error:\n    raise ConfigError(f\"Cannot read config file: {error}\") from error\n  except yaml.YAMLError as error:\n    raise ConfigError(f\"Config file is not valid YAML: {error}\") from error\n\n  if not isinstance(raw_config, dict):\n    raise ConfigError(\n        \"Config file must contain a top-level mapping of settings.\"\n    )\n\n  _require_keys(raw_config, _REQUIRED_TOP_LEVEL_KEYS, \"config.yaml\")\n\n  root_dir = _require_non_empty_string(raw_config[\"root_dir\"], \"root_dir\")\n  sam3_checkpoint_path = _require_non_empty_string(\n      raw_config[\"sam3_checkpoint_path\"], \"sam3_checkpoint_path\"\n  )\n  cuda_visible_devices = _validate_cuda_visible_devices(\n      raw_config[\"cuda_visible_devices\"]\n  )\n\n  input_images_folder_name = _require_allowed_folder_name(\n      raw_config[\"input_images_folder_name\"], \"input_images_folder_name\"","sourceCodeStart":645,"sourceCodeEnd":681,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/projects/waste_identification_ml/data_generation/auto_labeler_pipeline/config_loader.py#L645-L681","documentation":"Error \"Config file is not valid YAML: {error}\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/projects/waste_identification_ml/data_generation/auto_labeler_pipeline/config_loader.py:663 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"}