Skip to main content

Evidently AI: ML Model Monitoring, Drift Detection & Reports

Evidently is the open-source ML monitoring library for detecting data drift, monitoring model quality, and generating rich HTML reports. Catch silent model degradation before it affects your business — in batch pipelines or real-time streams.

✓ Data drift detection (KS/chi-sq/PSI) ✓ Pass/fail Test Suites for CI/CD ✓ HTML & JSON report generation ✓ No labels required for drift detection
Share this tool: X / Twitter LinkedIn
✓ 60,000+ developers use DevPlaybook ★★★★★ 4.8 / 5 on Gumroad ✓ MIT licensed · Instant download ✓ No login required

Related Products

on Gumroad

You Might Also Need

More Free Tools

Enjoying this tool? Get more like it.

Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.

DevPlaybook Pro 7 days free

Unlock AI-Powered Dev Tools

  • ⚡ AI Code Review, Doc Generator & SQL Builder
  • ⚡ All premium templates & early access
  • ⚡ Member discounts on Gumroad products
Start Free Trial →

$9/mo after trial · Cancel anytime

Want the full toolkit?

Get DevPlaybook Pro

Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.

$79
$241 separately Save $162 (67% off)
Get DevPlaybook Pro — $79 →

MIT licensed · Instant download · No subscription

See what's included → Browse all deals →

Generating Data Drift Reports

Install with pip install evidently. Compare a reference dataset against current production data:

import pandas as pd
from evidently.report import Report
from evidently.metric_preset import DataDriftPreset, DataQualityPreset
from evidently.metric_preset import ClassificationPreset, RegressionPreset

# Load reference (training) and current (production) data
reference_data = pd.read_csv("train_data.csv")
current_data = pd.read_csv("prod_data_last_24h.csv")

# Data drift report — detects feature distribution changes
drift_report = Report(metrics=[
    DataDriftPreset(drift_share_threshold=0.2),  # fail if >20% features drift
    DataQualityPreset(),                           # missing values, outliers, etc.
])

drift_report.run(
    reference_data=reference_data,
    current_data=current_data,
    column_mapping=None   # or specify target/prediction/datetime columns
)

# Save interactive HTML report
drift_report.save_html("drift_report.html")

# Extract metrics programmatically
result = drift_report.as_dict()
drift_share = result["metrics"][0]["result"]["share_of_drifted_columns"]
print(f"Drifted features: {drift_share * 100:.1f}%")

# Model quality report (requires ground truth labels)
quality_report = Report(metrics=[ClassificationPreset()])
quality_report.run(
    reference_data=reference_data,
    current_data=current_data.assign(prediction=model.predict(current_data)),
)
quality_report.save_html("quality_report.html")

Test Suites for CI/CD Monitoring Gates

Use Test Suites instead of Reports when you need pass/fail decisions in pipelines:

from evidently.test_suite import TestSuite
from evidently.tests import (
    TestShareOfDriftedColumns,
    TestNumberOfMissingValues,
    TestColumnDrift,
    TestMeanInNSigmas,
    TestShareOfOutRangeValues,
)

suite = TestSuite(tests=[
    # Fail if more than 20% of features drift
    TestShareOfDriftedColumns(lt=0.2),

    # Fail if missing values exceed 5%
    TestNumberOfMissingValues(lt=0.05),

    # Monitor specific high-impact features individually
    TestColumnDrift(column_name="user_age"),
    TestColumnDrift(column_name="purchase_value"),

    # Fail if mean prediction outside 3 sigma of reference
    TestMeanInNSigmas(column_name="prediction", n=3),

    # Fail if out-of-range values exceed 1%
    TestShareOfOutRangeValues(column_name="feature_score", lt=0.01),
])

suite.run(reference_data=reference_data, current_data=current_data)
suite.save_html("test_results.html")

# CI/CD gate: exit non-zero if any test fails
result = suite.as_dict()
all_passed = all(t["status"] == "SUCCESS" for t in result["tests"])
if not all_passed:
    failed = [t["name"] for t in result["tests"] if t["status"] != "SUCCESS"]
    print(f"FAILED tests: {failed}")
    raise SystemExit(1)

Batch Pipeline Integration (Airflow / Prefect)

Schedule Evidently monitoring as a daily batch job:

from airflow import DAG
from airflow.operators.python import PythonOperator
from datetime import datetime, timedelta
import pandas as pd
from evidently.report import Report
from evidently.metric_preset import DataDriftPreset

def run_monitoring(**context):
    ds = context["ds"]  # execution date

    # Load reference data from feature store
    reference = pd.read_parquet("s3://ml-bucket/reference/train_features.parquet")

    # Load yesterday's production data
    current = pd.read_parquet(f"s3://ml-bucket/prod/{ds}/features.parquet")

    report = Report(metrics=[DataDriftPreset(drift_share_threshold=0.15)])
    report.run(reference_data=reference, current_data=current)

    # Save report and metrics to S3
    report.save_html(f"/tmp/drift_report_{ds}.html")
    metrics = report.as_dict()

    drift_share = metrics["metrics"][0]["result"]["share_of_drifted_columns"]
    if drift_share > 0.15:
        send_slack_alert(f"[ALERT] Data drift detected: {drift_share:.0%} features drifted on {ds}")

with DAG("ml_monitoring", schedule_interval="0 6 * * *", start_date=datetime(2024, 1, 1)) as dag:
    monitor = PythonOperator(task_id="run_drift_monitoring", python_callable=run_monitoring)

Evidently vs WhyLogs vs NannyML vs Arize

Feature Evidently WhyLogs NannyML Arize AI
Open-sourceYes (Apache 2.0)Yes (Apache 2.0)Yes (Apache 2.0)No (SaaS)
HTML reportsRich interactive HTMLJSON profilesPlots (matplotlib)Cloud dashboard
No-label drift detectionYesYesYes (CBPE)Yes
CI/CD test suitesBuilt-in TestSuitewhylabs integrationNoNo (SaaS alerts)
Streaming supportBatch + windowLow-overhead loggingBatch onlyReal-time
Best forBatch monitoring, reportsLightweight loggingPerf estimationEnterprise platform

Frequently Asked Questions

What is Evidently AI and what problem does it solve?▼

Evidently AI is an open-source library for evaluating, testing, and monitoring ML models and data pipelines. It solves the production ML problem: models degrade silently after deployment. Data distributions shift, feature correlations change, and prediction quality drops — but without monitoring, you only discover this when business KPIs decline. Evidently provides ready-to-use statistical tests and reports to detect these issues automatically.

What is data drift and how does Evidently detect it?▼

Data drift (also called covariate shift) occurs when the statistical distribution of input features changes between training and production. For example, user age distribution shifts after a product pivot, or sensor readings change after hardware replacement. Evidently uses statistical tests to detect drift: Kolmogorov-Smirnov for continuous features, chi-squared for categorical features, Population Stability Index (PSI), and Jensen-Shannon divergence. Each test returns a drift score and a binary drift/no-drift verdict.

What is the difference between data drift and concept drift?▼

Data drift (covariate shift) is when P(X) changes — input feature distributions change but the true relationship between features and target remains the same. Concept drift is when P(Y|X) changes — the relationship between inputs and the target changes, meaning the model's learned function is now wrong. Data drift can be detected without labels (just compare feature distributions). Concept drift requires ground truth labels and comparison of prediction quality metrics over time.

How do Evidently Test Suites differ from Reports?▼

Reports are exploratory documents with rich visualizations — use them for EDA, debugging, and communicating model quality. Test Suites are assertion-based: you define pass/fail conditions (e.g., 'drift share < 0.2' or 'mean prediction error < 0.05') and the suite returns a binary pass/fail result. Use Test Suites in CI/CD pipelines to automatically block deployments if data quality degrades below thresholds.

How do I use Evidently in a batch monitoring pipeline?▼

In a batch pipeline (daily or hourly), load the reference dataset (training data) and the current production batch, create an Evidently Report with your desired presets, and save the HTML report or JSON metrics. For alerting, use Test Suites: if any test fails, trigger an alert to Slack/PagerDuty. Evidently integrates with Airflow, Prefect, and MLflow for automated monitoring workflows.

What is Evidently Cloud?▼

Evidently Cloud is the managed version of Evidently with a web dashboard for tracking metrics over time, configuring alerts, and comparing monitoring snapshots. Unlike the open-source library (which generates static HTML reports), Evidently Cloud stores monitoring history, shows metric trend charts, and sends automated alerts when drift thresholds are exceeded. It is useful for teams that need persistent monitoring history without managing their own infrastructure.