Real-time drift detection for ML pipelines using PSI
Project description
etsi-watchdog
Real-time Drift Detection for Machine Learning Pipelines
etsi-watchdog is a lightweight, pluggable Python library that detects distribution shifts between training and production data. It supports both numeric and categorical features using Population Stability Index (PSI), and allows users to trigger custom actions on drift detection.
Installation
Install the latest version:
pip install etsi-watchdog
Features
Supports numeric and categorical features
Uses PSI (Population Stability Index) for drift detection
Safe binning and smoothing to avoid division errors
Per-column drift scoring
Customizable hooks via .on_drift() to trigger actions
Simple and extensible API
Quick Start
from etsi.watchdog import DriftMonitor
import pandas as pd
# Reference (training) data
X_ref = pd.read_csv("train.csv")
# Incoming (production) batch
X_live = pd.read_csv("production.csv")
# Initialize and monitor
monitor = DriftMonitor(reference=X_ref)
# Run check and handle drift
monitor.watch(X_live, threshold=0.2).on_drift(lambda: print("Drift detected"))
Use Cases
Monitor batch data for concept drift
Trigger model retraining workflows
Add drift alerts to production pipelines
Validate incoming data quality in staging or CI pipelines
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file etsi_watchdog-0.2.0.tar.gz.
File metadata
- Download URL: etsi_watchdog-0.2.0.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b6cfdf1c619cd142522c74d363b6b1a1c3913c8dc2cf594f74adaa94d58ac21b
|
|
| MD5 |
90e3f2cfa90766053c2152edc9662290
|
|
| BLAKE2b-256 |
d2b12187eca3978e0590d72f47520fd1c37e746b2adc65f2277971fc1cadd732
|
File details
Details for the file etsi_watchdog-0.2.0-py3-none-any.whl.
File metadata
- Download URL: etsi_watchdog-0.2.0-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7b425c9bc8a20688a3227fc5b58f327c8d2d1fcc100bde610eeb23fc69ebbdb5
|
|
| MD5 |
3ea43e64c41a5c66c1609172ac4b34c4
|
|
| BLAKE2b-256 |
985a445204bf09227c8b279faf6af5a06388d9ea84a29b03403472ae8d8954cf
|