{"record":{"id":"e5ca26a57bcf5bbb","repo":"tensorflow/models","slug":"cuda-visible-devices-must-be-a-string-or-integer","errorCode":null,"errorMessage":"cuda_visible_devices must be a string or integer, got {raw_value!r}.","messagePattern":"cuda_visible_devices must be a string 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":620,"sourceCode":"        ),\n    )\n  return validated\n\n\ndef _validate_cuda_visible_devices(raw_value: Any) -> str:\n  \"\"\"Validates cuda_visible_devices, allowing ints and coercing to string.\n\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","sourceCodeStart":602,"sourceCodeEnd":638,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/projects/waste_identification_ml/data_generation/auto_labeler_pipeline/config_loader.py#L602-L638","documentation":"Error \"cuda_visible_devices must be a string 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:620 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"}