tfma.view.render_slicing_metrics

tfma.view.render_slicing_metrics(
    result,
    slicing_column=None,
    slicing_spec=None,
    weighted_example_column=None
)

Defined in view/widget_view.py.

Renders the slicing metrics view as widget.

Args:

  • result: An tfma.EvalResult.
  • slicing_column: The column to slice on.
  • slicing_spec: The slicing spec to filter results. If neither column nor spec is set, show overall.
  • weighted_example_column: Override for the weighted example column. This can be used when different weights are applied in different aprts of the model (eg: multi-head).

Returns:

A SlicingMetricsViewer object if in Jupyter notebook; None if in Colab.