Implementation:Evidentlyai Evidently Report Init
Appearance
| Knowledge Sources | |
|---|---|
| Domains | ML_Monitoring, Evaluation |
| Last Updated | 2026-02-14 12:00 GMT |
Overview
Concrete constructor for configuring Evidently Report objects with metrics and presets provided by the Evidently library.
Description
Report.__init__() creates a report configuration by accepting a list of metrics/presets and optional metadata. The Report stores its configuration and defers computation to the run() method. Convenience parameters (model_id, reference_id, batch_size, dataset_id) are stored in the metadata dictionary.
Usage
Import the Report class and initialize it with a list of metrics or presets before calling run() with your datasets.
Code Reference
Source Location
- Repository: evidently
- File: src/evidently/core/report.py
- Lines: L820-901
Signature
class Report:
def __init__(
self,
metrics: List[MetricOrContainer],
metadata: Dict[str, MetadataValueType] = None,
tags: List[str] = None,
model_id: str = None,
reference_id: str = None,
batch_size: str = None,
dataset_id: str = None,
include_tests: bool = False,
):
"""
Args:
metrics: List of metrics or metric containers (presets) to include.
metadata: Optional metadata key-value pairs.
tags: Optional tags for categorizing reports.
model_id: Optional model identifier (stored in metadata).
reference_id: Optional reference identifier (stored in metadata).
batch_size: Optional batch size identifier (stored in metadata).
dataset_id: Optional dataset identifier (stored in metadata).
include_tests: Whether to include automatic tests for metrics.
"""
Import
from evidently import Report
# or
from evidently.core.report import Report
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| metrics | List[MetricOrContainer] | Yes | Metrics and/or presets to compute |
| metadata | Dict[str, MetadataValueType] | No | Metadata key-value pairs |
| tags | List[str] | No | Tags for categorization |
| include_tests | bool | No | Enable auto-tests (default: False) |
| model_id | str | No | Model identifier (stored in metadata) |
Outputs
| Name | Type | Description |
|---|---|---|
| Report | Report | Configured report ready for run() execution |
Usage Examples
Drift Monitoring Report
from evidently import Report
from evidently.metrics import ValueDrift, MissingValueCount
from evidently.metrics.dataset_statistics import DriftedColumnsCount
report = Report(
metrics=[
ValueDrift(column="age"),
ValueDrift(column="salary"),
DriftedColumnsCount(),
MissingValueCount(column="age"),
]
)
Quality Report with Tests
from evidently import Report
from evidently.presets import ClassificationQuality
report = Report(
metrics=[ClassificationQuality()],
include_tests=True,
model_id="fraud_detector_v2",
)
Related Pages
Implements Principle
Requires Environment
Page Connections
Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment