{"record":{"id":"b9353803cdd28642","repo":"tensorflow/models","slug":"unrecognized-file-type-b93538","errorCode":null,"errorMessage":"Unrecognized file_type: {}","messagePattern":"Unrecognized file_type: (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"official/projects/pointpillars/tasks/pointpillars.py","lineNumber":40,"sourceCode":"\nfrom official.core import base_task\nfrom official.core import task_factory\nfrom official.projects.pointpillars.configs import pointpillars as cfg\nfrom official.projects.pointpillars.dataloaders import decoders\nfrom official.projects.pointpillars.dataloaders import parsers\nfrom official.projects.pointpillars.modeling import factory\nfrom official.projects.pointpillars.utils import utils\nfrom official.vision.dataloaders import input_reader_factory\nfrom official.vision.losses import focal_loss\nfrom official.vision.losses import loss_utils\n\n\ndef pick_dataset_fn(file_type: str) -> Any:\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\n\ndef get_batch_size_per_replica(global_batch_size: int) -> int:\n  \"\"\"Get batch size per accelerator replica.\"\"\"\n  num_replicas = tf.distribute.get_strategy().num_replicas_in_sync\n  if global_batch_size < num_replicas:\n    logging.warning('Global batch size is smaller than num replicas. '\n                    'Set batch size per replica to 1.')\n    return 1\n  if global_batch_size % num_replicas != 0:\n    raise ValueError(\n        'global_batch_size {} is not a multiple of num_replicas {}'\n        .format(global_batch_size, num_replicas))\n  batch_size = int(global_batch_size / num_replicas)\n  return batch_size\n\n\n@task_factory.register_task_cls(cfg.PointPillarsTask)","sourceCodeStart":22,"sourceCodeEnd":58,"githubUrl":"https://github.com/tensorflow/models/blob/e006f5f0d534913e49c1f1dae87364039fa607e2/official/projects/pointpillars/tasks/pointpillars.py#L22-L58","documentation":"Generic dispatch guard in pick_dataset_fn: it maps a file_type string to a tf.data dataset constructor and supports only 'tfrecord' and 'tfrecord_compressed'; any other value (e.g. from task_config.input_path suffix parsing) raises this ValueError.","triggerScenarios":"Thrown at official/projects/pointpillars/tasks/pointpillars.py:40 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set the input file_type to 'tfrecord' or 'tfrecord_compressed'","Check the input path/config for a typo or unsupported extension","Add a mapping branch for a new storage format if required"],"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"}