Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Evidentlyai Evidently Row Test Summary

From Leeroopedia
Knowledge Sources
Domains Metrics, Testing, Data Quality
Last Updated 2026-02-14 12:00 GMT

Overview

Implements the RowTestSummary metric container that computes per-row test pass rates and renders them as pie chart visualizations.

Description

The Row Test Summary module provides the RowTestSummary class, a MetricContainer that summarizes the results of row-level tests across specified columns. It computes the mean pass rate for each test column and visualizes the results as pie charts showing the distribution of passed vs. failed rows.

The RowTestSummary container generates two types of sub-metrics:

  • MeanValue for each test column -- computes the mean pass rate (where 1.0 means all rows passed). When include_tests is enabled, a bound test using gte(min_success_rate) is attached to ensure the pass rate meets the minimum threshold.
  • RowCount -- provides the total row count used to compute absolute pass/fail counts in the pie charts.

The render method produces pie chart widgets for each test column. Each chart shows the number of passed and failed rows using green and red coloring. The last test column in an odd-numbered list is rendered at full width; all others are rendered at half width.

Test columns are determined by the columns parameter if specified, or fall back to context.data_definition.test_descriptors if available.

Usage

Use RowTestSummary in reports where you have row-level test columns (columns containing boolean pass/fail values, typically from descriptors or row-level checks). Configure columns to specify which test columns to summarize, and min_success_rate to set the minimum acceptable pass rate (default: 1.0 = 100%).

Code Reference

Source Location

Signature

class RowTestSummary(MetricContainer):
    columns: List[str] = []
    min_success_rate: float = 1

    def generate_metrics(self, context: "Context") -> Sequence[MetricOrContainer]:
        ...
    def get_row_count_metric(self) -> Metric:
        ...
    def get_test_columns(self, context) -> List[str]:
        ...
    def get_test_column_metric(self, test_column: str, context) -> Metric:
        ...
    def render(self, context, child_widgets=None) -> List[BaseWidgetInfo]:
        ...

Import

from evidently.metrics.row_test_summary import RowTestSummary

I/O Contract

Inputs

Name Type Required Description
columns List[str] No List of test column names to summarize; if empty, falls back to data_definition.test_descriptors
min_success_rate float No Minimum acceptable pass rate for bound tests (default: 1.0 meaning 100%)

Outputs

Name Type Description
generate_metrics return Sequence[MetricOrContainer] List of MeanValue metrics (one per test column) plus a RowCount metric
render return List[BaseWidgetInfo] List of pie chart widgets showing pass/fail distribution per test column

Usage Examples

from evidently.metrics.row_test_summary import RowTestSummary
from evidently.core.report import Report

# Summarize specific test columns
report = Report(metrics=[
    RowTestSummary(columns=["is_valid", "passes_quality_check"], min_success_rate=0.95),
])

# Auto-detect test columns from data definition
report = Report(metrics=[
    RowTestSummary(),
])

report.run(reference_data=ref_df, current_data=curr_df)

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment