tensorflow/models · error · ConfigError
must be one of , got .
Error message
{field_name} must be one of {list(allowed_values)}, got {value!r}. What it means
A ConfigError from _require_allowed_folder_name: each folder-name knob in the YAML has exactly one allowed value declared in _ALLOWED_FOLDER_NAMES, and the configured value is not in that set. This enforces a fixed on-disk layout expected by downstream stages.
Solutions
- Set the field to the allowed value listed in the message.
- Do not rename pipeline-managed folders; the pipeline expects canonical names.
- Update any scripts that generate the config to emit the canonical folder name.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at official/projects/waste_identification_ml/data_generation/auto_labeler_pipeline/config_loader.py:370 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/e39bdd08f289d8af.
Report an issue: GitHub.
Appendix: source
Thrown at official/projects/waste_identification_ml/data_generation/auto_labeler_pipeline/config_loader.py:370
Each folder-name knob has exactly one allowed value declared in
``_ALLOWED_FOLDER_NAMES``. Any other value is rejected with a message
listing the allowed set.
Args:
value: The value to validate.
field_name: The top-level YAML field name (also the key into
``_ALLOWED_FOLDER_NAMES``).
Returns:
The validated string.
Raises:
ConfigError: If the value is not in the allowed set for that field.
"""
allowed_values = _ALLOWED_FOLDER_NAMES[field_name]
if value not in allowed_values:
raise ConfigError(
f"{field_name} must be one of {list(allowed_values)}, "
f"got {value!r}."
)
return value
def _validate_crop_size(
raw_crop_size: Any, prompt_name: str
) -> tuple[int, int]:
"""Validates and normalizes a crop_size entry into a tuple.
Args:
raw_crop_size: The value read from YAML; expected to be a two-element
sequence of positive integers.
prompt_name: Prompt name used in the error message.
Returns:
The crop size as a ``(height, width)`` tuple of ints.View on GitHub (pinned to e006f5f0d5)