Join us at TensorFlow World, Oct 28-31. Use code TF20 for 20% off select passes. Register now

tfma.extractors.PredictExtractor

tfma.extractors.PredictExtractor(
    eval_shared_model,
    desired_batch_size=None,
    materialize=True
)

Defined in extractors/predict_extractor.py.

Creates an Extractor for TFMAPredict.

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.

Args:

  • eval_shared_model: Shared model parameters for EvalSavedModel.
  • 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.

Returns:

Extractor for extracting features, predictions, labels, and other tensors during predict.