{"record":{"id":"c7fc181a011197e6","repo":"tensorflow/models","slug":"cuda-visible-devices-must-be-a-string-quote-it-in","errorCode":null,"errorMessage":"cuda_visible_devices must be a string (quote it in YAML) or integer, got {raw_value!r}.","messagePattern":"cuda_visible_devices must be a string \\(quote it in YAML\\) or integer, got (.+?)\\.","errorType":"exception","errorClass":"ConfigError","httpStatus":null,"severity":"error","filePath":"official/projects/waste_identification_ml/data_generation/auto_labeler_pipeline/config_loader.py","lineNumber":627,"sourceCode":"\n  Args:\n      raw_value: The value read from YAML.\n\n  Returns:\n      The value as a string suitable for CUDA_VISIBLE_DEVICES.\n\n  Raises:\n      ConfigError: If the value is neither a string nor an integer.\n  \"\"\"\n  if isinstance(raw_value, bool):\n    raise ConfigError(\n        f\"cuda_visible_devices must be a string or integer, got {raw_value!r}.\"\n    )\n  if isinstance(raw_value, int):\n    return str(raw_value)\n  if isinstance(raw_value, str):\n    return raw_value\n  raise ConfigError(\n      \"cuda_visible_devices must be a string (quote it in YAML) or \"\n      f\"integer, got {raw_value!r}.\"\n  )\n\n\n# ── Public loader ───────────────────────────────────────────────────────────\n\n\ndef load_config(config_path: str) -> PipelineConfig:\n  \"\"\"Reads, validates, and returns the pipeline configuration.\n\n  All validation happens here so that every stage fails at the same gate,\n  before any dataset walk or GPU work. On success the returned object is\n  fully typed and internally consistent.\n\n  Args:\n      config_path: Path to the YAML configuration file.\n","sourceCodeStart":609,"sourceCodeEnd":645,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/projects/waste_identification_ml/data_generation/auto_labeler_pipeline/config_loader.py#L609-L645","documentation":"Error \"cuda_visible_devices must be a string (quote it in YAML) or integer, got {raw_value!r}.\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/projects/waste_identification_ml/data_generation/auto_labeler_pipeline/config_loader.py:627 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"}