tensorflow/models · error · ConfigError
Prompt name must be a non-empty string, got {prompt_name!r}.
Error message
Prompt name must be a non-empty string, got {prompt_name!r}. What it means
Error "Prompt name must be a non-empty string, got {prompt_name!r}." thrown in tensorflow/models.
Source
Thrown at official/projects/waste_identification_ml/data_generation/auto_labeler_pipeline/config_loader.py:588
"""Validates the ``prompts`` mapping into typed PromptConfig objects.
Args:
raw_prompts: The ``prompts`` mapping read from YAML.
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
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:588 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/fd85fa3c03385b81.
Report an issue: GitHub.