tensorflow/models · error · ConfigError
cuda_visible_devices must be a string (quote it in YAML) or
Error message
cuda_visible_devices must be a string (quote it in YAML) or integer, got {raw_value!r}. What it means
Error "cuda_visible_devices must be a string (quote it in YAML) or integer, got {raw_value!r}." thrown in tensorflow/models.
Source
Thrown at official/projects/waste_identification_ml/data_generation/auto_labeler_pipeline/config_loader.py:627
Args:
raw_value: The value read from YAML.
Returns:
The value as a string suitable for CUDA_VISIBLE_DEVICES.
Raises:
ConfigError: If the value is neither a string nor an integer.
"""
if isinstance(raw_value, bool):
raise ConfigError(
f"cuda_visible_devices must be a string or integer, got {raw_value!r}."
)
if isinstance(raw_value, int):
return str(raw_value)
if isinstance(raw_value, str):
return raw_value
raise ConfigError(
"cuda_visible_devices must be a string (quote it in YAML) or "
f"integer, got {raw_value!r}."
)
# ── Public loader ───────────────────────────────────────────────────────────
def load_config(config_path: str) -> PipelineConfig:
"""Reads, validates, and returns the pipeline configuration.
All validation happens here so that every stage fails at the same gate,
before any dataset walk or GPU work. On success the returned object is
fully typed and internally consistent.
Args:
config_path: Path to the YAML configuration file.
View on GitHub (pinned to e006f5f0d5)
When it happens
Trigger: Thrown at official/projects/waste_identification_ml/data_generation/auto_labeler_pipeline/config_loader.py:627 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of tensorflow/models@e006f5f0d5 (2026-08-24).
Data as JSON: /api/errors/c7fc181a011197e6.
Report an issue: GitHub.