{"record":{"id":"814514092e301c32","repo":"tensorflow/models","slug":"field-name-must-be-an-integer-got-value-r","errorCode":null,"errorMessage":"{field_name} must be an integer, got {value!r}.","messagePattern":"(.+?) must be an integer, got (.+?)\\.","errorType":"exception","errorClass":"ConfigError","httpStatus":null,"severity":"error","filePath":"official/projects/waste_identification_ml/data_generation/auto_labeler_pipeline/config_loader.py","lineNumber":324,"sourceCode":"    )\n  return float(value)\n\n\ndef _require_positive_int(value: Any, field_name: str) -> int:\n  \"\"\"Validates that a value is a positive (non-zero) integer.\n\n  Args:\n      value: The value to validate.\n      field_name: Field name used in the error message.\n\n  Returns:\n      The validated integer.\n\n  Raises:\n      ConfigError: If the value is not a positive integer.\n  \"\"\"\n  if isinstance(value, bool) or not isinstance(value, int):\n    raise ConfigError(f\"{field_name} must be an integer, got {value!r}.\")\n  if value < 1:\n    raise ConfigError(f\"{field_name} must be at least 1, got {value!r}.\")\n  return int(value)\n\n\ndef _require_non_empty_string(value: Any, field_name: str) -> str:\n  \"\"\"Validates that a value is a non-empty string.\n\n  Args:\n      value: The value to validate.\n      field_name: Field name used in the error message.\n\n  Returns:\n      The validated string, unchanged.\n\n  Raises:\n      ConfigError: If the value is not a non-empty string.\n  \"\"\"","sourceCodeStart":306,"sourceCodeEnd":342,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/projects/waste_identification_ml/data_generation/auto_labeler_pipeline/config_loader.py#L306-L342","documentation":"A ConfigError from _require_positive_int: the YAML value is not an int (booleans rejected explicitly, since bool subclasses int). It fires during load_config validation of integer settings such as max_cpu_workers and queue_maxsize.","triggerScenarios":"Thrown at official/projects/waste_identification_ml/data_generation/auto_labeler_pipeline/config_loader.py:324 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Write the value as a plain unquoted integer, e.g. 4.","Remove quotes around the value so YAML parses it as an int, not a string.","Replace true/false or float values like 4.0 with an integer."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e006f5f0d534913e49c1f1dae87364039fa607e2","analyzedAt":"2026-08-24T14:09:15.576Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}