TensorFlow 2.0 Beta is available Learn more

The Evaluator TFX Pipeline Component

The Evaluator TFX pipeline component performs deep analysis on the training results for your models, to help you understand how your model performs on subsets of your data.

Evaluator and TensorFlow Model Analysis

Evaluator leverages the TensorFlow Model Analysis library to perform the analysis, which in turn use Apache Beam for scalable processing.

Using the Evaluator Component

A Evaluator pipeline component is typically very easy to deploy and requires little customization, since all of the work is done by the Evaluator TFX component. Typical code looks like this:

from tfx import components
import tensorflow_model_analysis as tfma

...

# For TFMA evaluation
taxi_eval_spec = [
    tfma.SingleSliceSpec(),
    tfma.SingleSliceSpec(columns=['trip_start_hour'])
]

model_analyzer = components.Evaluator(
      examples=examples_gen.outputs.examples,
      feature_slicing_spec=taxi_eval_spec,
      model_exports=trainer.outputs.output
      )