tensorflow/models · error · ConfigError
prompts.{prompt_name!r} must be a mapping.
Error message
prompts.{prompt_name!r} must be a mapping. What it means
Error "prompts.{prompt_name!r} must be a mapping." thrown in tensorflow/models.
Source
Thrown at official/projects/waste_identification_ml/data_generation/auto_labeler_pipeline/config_loader.py:592
Returns:
A dict mapping prompt name to :class:`PromptConfig`.
Raises:
ConfigError: If the mapping is empty, malformed, or any prompt block
fails validation.
"""
if not isinstance(raw_prompts, dict) or not raw_prompts:
raise ConfigError("prompts must be a non-empty mapping.")
validated = {}
for prompt_name, raw_block in raw_prompts.items():
if not isinstance(prompt_name, str) or not prompt_name:
raise ConfigError(
f"Prompt name must be a non-empty string, got {prompt_name!r}."
)
if not isinstance(raw_block, dict):
raise ConfigError(f"prompts.{prompt_name!r} must be a mapping.")
_require_keys(
raw_block,
("detection", "augmentations"),
f"prompts.{prompt_name!r}",
)
validated[prompt_name] = PromptConfig(
detection=_validate_detection(raw_block["detection"], prompt_name),
augmentations=_validate_augmentations(
raw_block["augmentations"], prompt_name
),
)
return validated
def _validate_cuda_visible_devices(raw_value: Any) -> str:
"""Validates cuda_visible_devices, allowing ints and coercing to string.
Args: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:592 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/82e8e40a328ea15e.
Report an issue: GitHub.