# tfma.extractors.PredictExtractor

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/model-analysis/blob/v0.46.0/tensorflow_model_analysis/extractors/legacy_predict_extractor.py#L42-L78) |

Creates an Extractor for TFMAPredict.

    tfma.extractors.PredictExtractor(
        eval_shared_model: https://www.tensorflow.org/tfx/model_analysis/api_docs/python/tfma/types/MaybeMultipleEvalSharedModels,
        desired_batch_size: Optional[int] = None,
        materialize: Optional[bool] = True,
        eval_config: Optional[https://www.tensorflow.org/tfx/model_analysis/api_docs/python/tfma/EvalConfig] = None
    ) -> https://www.tensorflow.org/tfx/model_analysis/api_docs/python/tfma/extractors/Extractor

The extractor's PTransform loads and runs the eval_saved_model against every
example yielding a copy of the Extracts input with an additional extract
of type FeaturesPredictionsLabels keyed by
tfma.FEATURES_PREDICTIONS_LABELS_KEY unless eval_config is not None in which
case the features, predictions, and labels will be stored separately under
tfma.FEATURES_KEY, tfma.PREDICTIONS_KEY, and tfma.LABELS_KEY respectively.

<br />

<br />

<br />

| ## Args ||
|---|---|
| `eval_shared_model` | Shared model (single-model evaluation) or list of shared models (multi-model evaluation). |
| `desired_batch_size` | Optional batch size for batching in Aggregate. |
| `materialize` | True to call the FeatureExtractor to add MaterializedColumn entries for the features, predictions, and labels. |
| `eval_config` | Eval config. |

<br />

<br />

<br />

<br />

| ## Returns ||
|---|---|
| Extractor for extracting features, predictions, labels, and other tensors during predict. ||

<br />