tfma.run_model_analysis

Runs TensorFlow model analysis.

Used in the notebooks

Used in the guideUsed in the tutorials

It runs a Beam pipeline to compute the slicing metrics exported in TensorFlow Eval SavedModel and returns the results.

This is a simplified API for users who want to quickly get something running locally. Users who wish to create their own Beam pipelines can use the Evaluate PTransform instead.

eval_shared_modelOptional shared model (single-model evaluation) or list of shared models (multi-model evaluation). Only required if needed by default extractors, evaluators, or writers.
eval_configEval config.
data_locationThe location of the data files.
file_formatThe file format of the data, can be either 'text' or 'tfrecords' for now. By default, 'tfrecords' will be used.
output_pathThe directory to output metrics and results to. If None, we use a temporary directory.
extractorsOptional list of Extractors to apply to Extracts. Typically these will be added by calling the default_extractors function. If no extractors are provided, default_extractors (non-materialized) will be used.
evaluatorsOptional list of Evaluators for evaluating Extracts. Typically these will be added by calling the default_evaluators function. If no evaluators are provided, default_evaluators will be used.
writersOptional list of Writers for writing Evaluation output. Typically these will be added by calling the default_writers function. If no writers are provided, default_writers will be used.
pipeline_optionsOptional arguments to run the Pipeline, for instance whether to run directly.
slice_specDeprecated (use EvalConfig).
write_configDeprecated (use EvalConfig).
compute_confidence_intervalsDeprecated (use EvalConfig).
min_slice_sizeDeprecated (use EvalConfig).
random_seed_for_testingProvide for deterministic tests only.
schemaOptional tf.Metadata schema of the input data.

An EvalResult that can be used with the TFMA visualization functions.

ValueErrorIf the file_format is unknown to us.