tensorflow/models · error · ValueError
Must provide at least one of training_file_pattern and…
Error message
Must provide at least one of training_file_pattern and eval_file_pattern.
What it means
Config guard in the detection pipeline setup: both training_file_pattern and eval_file_pattern are empty, so the input_fn builder has no data to read for either phase. At least one pattern must be supplied to construct a usable dataset.
Solutions
- Set --training_file_pattern (e.g. '/data/train.tfrecord*') for training runs
- Set --eval_file_pattern for evaluation-only runs
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at official/legaacy/detection/main.py:218 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/f7518cc1f794d643.
Report an issue: GitHub.
Appendix: source
Thrown at official/legacy/detection/main.py:218:218
if not training_file_pattern and not eval_file_pattern:
raise ValueError('Must provide at least one of training_file_pattern and '
'eval_file_pattern.')View on GitHub (pinned to e006f5f0d5)