Skip to content

feat: support custom dataset display names in reports#1860

Open
Nik-Reddy wants to merge 2 commits intoevidentlyai:mainfrom
Nik-Reddy:feat/custom-dataset-names-820
Open

feat: support custom dataset display names in reports#1860
Nik-Reddy wants to merge 2 commits intoevidentlyai:mainfrom
Nik-Reddy:feat/custom-dataset-names-820

Conversation

@Nik-Reddy
Copy link
Copy Markdown

@Nik-Reddy Nik-Reddy commented Apr 16, 2026

Fixes #820

I kept running into this when generating reports for A/B tests. The labels always say "Current" and "Reference" which doesn't really tell stakeholders anything useful. You end up having to explain what's what every time you share a report.

This adds current_name and reference_name options to RenderOptions so you can set them to something meaningful like "Model v2" / "Model v1" or "Treatment" / "Control".

Usage

from evidently.legacy.options.agg_data import RenderOptions

report = Report(metrics=[...], options=RenderOptions(
    current_name="Model v2 (fine-tuned)",
    reference_name="Model v1 (baseline)",
))
report.run(current_data=df_new, reference_data=df_old)
report.show()

What changed

The new fields live in RenderOptions with defaults of "Current" and "Reference" to match existing behavior. The configurable names flow through base_renderer.py into html_widgets.py, render_utils.py, and 14 metric renderer files that previously had the strings hardcoded. report.py and test_suite.py now pass render_options through to renderers.

Tests in tests/options/test_custom_dataset_names.py cover defaults, custom names, backward compatibility, and edge cases (10 tests total).

Backward compatibility

Defaults are "Current" and "Reference" (capitalized), matching what users see today. Nothing changes unless you explicitly set these options.

23 files changed, 203 additions, 53 deletions.

Addresses issue evidentlyai#820: users can now override the default 'current' and
'reference' dataset labels shown across all report and test suite
visualizations.

Added current_name and reference_name fields to RenderOptions with
backward-compatible defaults. Updated the rendering pipeline so that
Report and TestSuite propagate these options to all renderers.

Changed shared rendering utilities (render_utils, html_widgets,
tests/utils, visualization) and individual metric renderers to use
the configurable names in plot traces, subplot titles, table headers,
and counter labels.

Usage:
  report = Report(
      metrics=[...],
      options={'render': {'current_name': 'ModelA', 'reference_name': 'ModelB'}}
  )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support custom names for reference and current

1 participant