canary — ML Model Monitoring

1 min read Original article ↗

v1.2.5 · MIT · Python 3.9–3.12

Drift and anomaly detection for production ML models. Cutting-edge performance in a wrapper, for free.

$ pip install canary-ml

Keras/TensorFlow: pip install canary-ml[keras]

confidence_score · batch #2847

stable

1

line to wrap any sklearn or Keras model

0

infrastructure required — runs fully local

< 5'

from install to live monitoring dashboard

Data Drift Detection

KS test, PSI, chi-square per feature with configurable thresholds.

Anomaly Detection

Isolation Forest + z-score ensemble on inputs. KS test on prediction outputs.

Async Monitoring

Monitoring runs in a background thread. Your inference latency is unaffected.

Live Dashboard

Zero-dep HTML/JS dashboard. Ships with the package. No cloud account needed.

from canary_ml import ModelMonitor

monitor = ModelMonitor(
    model=your_model,
    reference_data=X_train,
    alert_threshold=0.2,
    log_path="./canary_logs"
)

# drop-in replacement — monitoring is a side effect
predictions = monitor.predict(X_new)

report = monitor.get_report()
print(report.psi_score, report.drift_detected, report.anomaly_rate)
# 0.41  True  0.032

monitor.serve_dashboard(port=8501)