{"record":{"id":"617a30835d61a509","repo":"tensorflow/models","slug":"error-trying-to-read-input-files-for-file-pattern","errorCode":null,"errorMessage":"Error trying to read input files for file pattern {file_pattern}","messagePattern":"Error trying to read input files for file pattern (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"official/projects/unified_detector/data_loaders/input_reader.py","lineNumber":234,"sourceCode":"      ValueError for inability to find SSTable files.\n    \"\"\"\n    all_file_patterns = []\n    if self._use_sampling:\n      for file_pattern in self._input_paths:\n        all_file_patterns.append([file_pattern])\n      # Normalize sampling probabilities.\n      total_weight = sum(self._sampling_weights)  # pyrefly: ignore[no-matching-overload]\n      sampling_probabilities = [\n          float(w) / total_weight for w in self._sampling_weights  # pyrefly: ignore[not-iterable]\n      ]\n    else:\n      all_file_patterns.append(self._input_paths)\n\n    datasets = []\n    for file_pattern in all_file_patterns:\n      filenames = sum(list(map(tf.io.gfile.glob, file_pattern)), [])\n      if not filenames:\n        raise ValueError(\n            f'Error trying to read input files for file pattern {file_pattern}')\n      # Create a dataset of filenames and shuffle the files. In each epoch,\n      # the file order is shuffled again. This may help if\n      # per_host_input_for_training = false on TPU.\n      dataset = tf.data.Dataset.list_files(\n          file_pattern, shuffle=self._is_training)\n\n      if self._is_training:\n        dataset = dataset.repeat()\n\n      if self._max_intra_op_parallelism:\n        # Disable intra-op parallelism to optimize for throughput instead of\n        # latency.\n        options = tf.data.Options()\n        options.experimental_threading.max_intra_op_parallelism = 1\n        dataset = dataset.with_options(options)\n\n      dataset = dataset.interleave(","sourceCodeStart":216,"sourceCodeEnd":252,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/projects/unified_detector/data_loaders/input_reader.py#L216-L252","documentation":"Error \"Error trying to read input files for file pattern {file_pattern}\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/projects/unified_detector/data_loaders/input_reader.py:234 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"e006f5f0d534913e49c1f1dae87364039fa607e2","analyzedAt":"2026-08-24T14:09:15.576Z","schemaVersion":2},"datasetVersion":"2026-08-24T17:17:21.512Z"}