Home
What is DriftWatch?¶
DriftWatch is a production-ready drift detection library designed for ML engineers who need reliable, actionable drift monitoring without the overhead of complex platforms.
Key Features¶
-
Simple API
Get started in 3 lines of code. No complex configuration required.
-
Production-Ready
Includes FastAPI middleware, Slack alerts, and comprehensive CLI tools.
-
Multiple Detectors
PSI, KS-Test, Wasserstein Distance, and Chi-Squared tests included.
-
Reliable
Fully type-hinted, tested (96%+ coverage), and minimally dependent.
Quick Example¶
from driftwatch import Monitor
import pandas as pd
# Load your data
train_df = pd.read_parquet("train.parquet")
prod_df = pd.read_parquet("production.parquet")
# Create monitor
monitor = Monitor(reference_data=train_df)
# Check for drift
report = monitor.check(prod_df)
if report.has_drift():
print(f"⚠️ Drift detected in {len(report.drifted_features())} features!")
print(f"Drift ratio: {report.drift_ratio():.1%}")
Use Cases¶
1. API Monitoring¶
Monitor your FastAPI ML service automatically:
from fastapi import FastAPI
from driftwatch.integrations.fastapi import DriftMiddleware
app = FastAPI()
app.add_middleware(DriftMiddleware, monitor=monitor)
2. CI/CD Integration¶
Check for drift in your deployment pipeline to prevent bad rollouts.
3. Slack Alerting¶
Get notified instantly when critical features drift.
What's Next?¶
-
Get Started
Run your first drift check in minutes
-
Core Concepts
Understand the math behind drift
-
API Reference
Explore the full API documentation