tensorflow/models · error · ValueError

Export module not implemented for

Error message

Export module not implemented for {} task.

What it means

Dispatch fall-through in get_export_module: the factory selects an export module by isinstance-checking params.task against known task types (classification, detection, ...). The given task matched none of the registered branches, so no export module exists for it — an unsupported or new task type, or a task object from an incompatible version. The message interpolates the task so the unmatched type is visible.

Solutions

  1. Check params.task's actual class against the task types handled in get_export_module
  2. Use a supported task (e.g. an ImageClassificationTask or a detection task) for export
  3. Implement and register a matching export-module branch for the new task type
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at official/projects/yolo/serving/export_module_factory.py:262 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/059ad7fab63e5c86. Report an issue: GitHub.

Appendix: source

Thrown at official/projects/yolo/serving/export_module_factory.py:262

                      input_type: str,
                      batch_size: Optional[int],
                      input_image_size: List[int],
                      num_channels: int = 3,
                      input_name: Optional[str] = None) -> ExportModule:
  """Factory for export modules."""
  if isinstance(params.task,
                darknet_classification.ImageClassificationTask):
    export_module = create_classification_export_module(params, input_type,
                                                        batch_size,  # pyrefly: ignore[bad-argument-type]
                                                        input_image_size,
                                                        num_channels,
                                                        input_name)
  elif isinstance(params.task, (yolo.YoloTask, yolov7.YoloV7Task)):
    export_module = create_yolo_export_module(params, input_type, batch_size,  # pyrefly: ignore[bad-argument-type]
                                              input_image_size, num_channels,
                                              input_name)
  else:
    raise ValueError('Export module not implemented for {} task.'.format(
        type(params.task)))
  return export_module

View on GitHub (pinned to e006f5f0d5)