tensorflow/models · error · ConfigError
{field_name} must be between {minimum} and {maximum}, got {v
Error message
{field_name} must be between {minimum} and {maximum}, got {value!r}. What it means
Error "{field_name} must be between {minimum} and {maximum}, got {value!r}." thrown in tensorflow/models.
Source
Thrown at official/projects/waste_identification_ml/data_generation/auto_labeler_pipeline/config_loader.py:303
Args:
value: The value to validate.
field_name: Field name used in the error message.
minimum: Inclusive lower bound.
maximum: Inclusive upper bound.
allow_int: Whether integer values are acceptable.
Returns:
The validated value as a float.
Raises:
ConfigError: If the value is not a number or is out of range.
"""
allowed_types = (int, float) if allow_int else (float,)
if isinstance(value, bool) or not isinstance(value, allowed_types):
raise ConfigError(f"{field_name} must be a number, got {value!r}.")
if not minimum <= value <= maximum:
raise ConfigError(
f"{field_name} must be between {minimum} and {maximum}, "
f"got {value!r}."
)
return float(value)
def _require_positive_int(value: Any, field_name: str) -> int:
"""Validates that a value is a positive (non-zero) integer.
Args:
value: The value to validate.
field_name: Field name used in the error message.
Returns:
The validated integer.
Raises:
ConfigError: If the value is not a positive integer.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:303 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/16d1157a0b9fb7b0.
Report an issue: GitHub.