Adding Panels

Design your Dashboard with custom Panels.

We recommend starting with pre-built Tabs for a quick start.

Code example

To see end-to-end code examples with custom Panels, check:

You can also explore the source code for the open-source live demo dashboards.

Adding Panels

You can add monitoring Panels using the Python API or the Evidently Cloud user interface.

Here is the general flow:

  • Define the Panel type: Counter, Plot, Distribution, Test Counter, or Test Plot. (See Panel types).

  • Specify panel title and size.

  • Add optional Tags to filter data. Without Tags, the Panel will use data from all Project snapshots.

  • Select Panel parameters, e.g., aggregation level.

  • Define the Panel value(s) to show:

    • For Test Panels, specify test_id.

    • For Metric and Distribution Panels, specify metric_id and field_path.

  • If applicable, pass test_args or metric_args to identify the exact value when they repeat in a snapshot. For instance, to plot the mean value of a given column, pass the column name as an argument.

This page explains each step in detail.

Add a new Panel

You can add monitoring Panels using the Python API, or directly in the user interface (Evidently Cloud or Enterprise).

Enter "edit" mode on the Dashboard (top right corner) and click "add Panel." Follow the steps to create a Panel. You can Preview the Panel before publishing.

Some tips:

  • Use the "Show description" toggle to get help on specific steps.

  • You can identify the field_path in two ways. Use the "Manual mode" toggle to switch.

    • Default mode displays popular values from existing Project snapshots.

    • Manual mode mirrors the Python API. You can select any value, even if it's not yet in the Project. Note that the Panel may be empty until you add the snapshot.

Add a new Tab

Multiple tabs is a Pro feature available in the Evidently Cloud.

By default, you add all Panels to a single Dashboard view. You can create multiple Tabs to organize them.

Enter the "edit" mode on the Dashboard (top right corner) and click "add Tab". To create a custom Tab, choose an “empty” tab and give it a name.

Proceed with adding Panels to this Tab as usual.

Delete Tabs or Panels

To delete all the existing monitoring Panels using the Python API:

project.dashboard.panels = []

project.save()

Note: This does not delete the snapshots; it only deletes the Panel configuration.

To delete the Tabs or Panels in the UI, use the “Edit” mode and click the “Delete” sign on the corresponding Panel or Tab.

Panel parameters

Panel types. To preview all Panel types, check the previous docs section. This page details the parameters and API.

Class DashboardPanel is a base class. Its parameters apply to all Panel types.

See usage examples below together with panel-specific parameters.

Counter

DashboardPanelCounter shows a value count or works as a text-only Panel.

See examples:

Text Panel. To create a Panel with the Dashboard title only:

project.dashboard.add_panel(
    DashboardPanelCounter(
        filter=ReportFilter(metadata_values={}, tag_values=[]),
        agg=CounterAgg.NONE,
        title="Bike Rental Demand Forecast",
        )
    )

Plot

DashboardPanelPlot shows individual values over time.

See examples:

Single value on a Plot. To plot MAPE over time in a line plot:

project.dashboard.add_panel(
    DashboardPanelPlot(
        title="MAPE",
        filter=ReportFilter(metadata_values={}, tag_values=[]),
        values=[
        PanelValue(
            metric_id="RegressionQualityMetric",
            field_path=metrics.RegressionQualityMetric.fields.current.mean_abs_perc_error,
            legend="MAPE",
        ),
    ],
    plot_type=PlotType.LINE,
    size=WidgetSize.HALF,
    )
)

Distribution

DashboardPanelDistribution shows changes in the distribution over time.

Example. To plot the distribution of the "education" column over time using STACK plot:

p.dashboard.add_panel(
        DashboardPanelDistribution(
            title="Column Distribution: current",
            filter=ReportFilter(metadata_values={}, tag_values=[]),
            value=PanelValue(
                field_path=ColumnDistributionMetric.fields.current,
                metric_id="ColumnDistributionMetric",
                metric_args={"column_name.name": "education"},
            ),
            barmode = HistBarMode.STACK
        )
    )

Test Counter

DashboardPanelTestSuiteCounter shows a counter with Test results.

See examples.

Last Test. To display the result of the latest Test in the Project.

project.dashboard.add_panel(
    DashboardPanelTestSuiteCounter(
        title="Success of last",
        agg=CounterAgg.LAST
    )
)

Test Plot

DashboardPanelTestSuite shows Test results over time.

Detailed Tests. To show the results of all individual Tests, with daily level aggregation.

project.dashboard.add_panel(
    DashboardPanelTestSuite(
        title="All tests: detailed",
        filter=ReportFilter(metadata_values={}, tag_values=[], include_test_suites=True),
        size=WidgetSize.HALF,
        panel_type=TestSuitePanelType.DETAILED,
        time_agg="1D",
    )
)

Panel Value

To define the value to show on a Metric Panel (Counter, Distribution, or Plot), you must pass the PanelValue. This includes source metric_id, field_path and metric_args.

See examples to specify the field_path:

Exact field name. To include the share_of_drifted_columns available inside the DatasetDriftMetric():

value=PanelValue(
    metric_id="DatasetDriftMetric",
    field_path="share_of_drifted_columns",
    legend="share",
)

In this example, you pass the exact name of the field.

See examples using different metric_args:

Column names as arguments. To show the mean values of target and prediction on a line plot.

values=[
    PanelValue(
        metric_id="ColumnSummaryMetric",
        field_path="current_characteristics.mean",
        metric_args={"column_name.name": "cnt"},
        legend="Target (daily mean)",
    ),
    PanelValue(
        metric_id="ColumnSummaryMetric",
        field_path="current_characteristics.mean",
        metric_args={"column_name.name": "prediction"},
        legend="Prediction (daily mean)",
    ),
]

How to find the field path?

Let's take an example of DataDriftPreset(). It contains two Metrics: DatasetDriftMetric() and DataDriftTable(). (Check the Preset ccomposition.

You can point to any of them as a metric_id, depending on what you’d like to plot.

Most Metrics contain multiple measurements inside (MetricResults) and some render data. To point to the specific value, use the field path.

To find available fields in the chosen Metric, you can explore the contents of the individual snapshot or use automated suggestions in UI or Python.

Each snapshot is a JSON file. You can download or open it in Python to see the available fields.

Alternatively, you can generate a Report with the selected Metrics on any test data. Get the output as a Python dictionary using as_dict() and explore the keys with field names.

Here is a partial example of the contents of DatasetDriftMetric():

'number_of_columns': 15,
'number_of_drifted_columns': 5,
'share_of_drifted_columns': 0.3333333333333333,
'dataset_drift': False,

Once you identify the value you’d like to plot (e.g., number_of_drifted_columns), pass it as the field_path to the PanelValue parameter. Include the DatasetDriftMetric as the metric_id.

Other Metrics and Tests follow the same logic.

Note that some data inside the snapshots cannot currently be plotted on a monitoring Dashboard (for example, render data or dictionaries). You can only plot values that exist as individual data points or histograms.

Last updated