{"record":{"id":"60ac4fc2fe9b4bdf","repo":"tensorflow/models","slug":"unrecognized-file-type","errorCode":null,"errorMessage":"Unrecognized file_type: {}","messagePattern":"Unrecognized file_type: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"official/common/dataset_fn.py","lineNumber":44,"sourceCode":"# See the License for the specific language governing permissions and\n# limitations under the License.\n# ==============================================================================\n\"\"\"Utility library for picking an appropriate dataset function.\"\"\"\n\nimport functools\nfrom typing import Any, Callable, Type, Union\n\nimport tensorflow as tf, tf_keras\n\nPossibleDatasetType = Union[Type[tf.data.Dataset], Callable[[tf.Tensor], Any]]\n\n\ndef pick_dataset_fn(file_type: str) -> PossibleDatasetType:\n  if file_type == 'tfrecord':\n    return tf.data.TFRecordDataset\n  if file_type == 'tfrecord_compressed':\n    return functools.partial(tf.data.TFRecordDataset, compression_type='GZIP')\n  raise ValueError('Unrecognized file_type: {}'.format(file_type))\n","sourceCodeStart":26,"sourceCodeEnd":45,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/common/dataset_fn.py#L26-L45","documentation":"Error \"Unrecognized file_type: {}\" thrown in tensorflow/models.","triggerScenarios":"Thrown at official/common/dataset_fn.py:44 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"}