canary — ML Model Monitoring
v1.2.5 · MIT · Python 3.9–3.12
CANARY
Drift and anomaly detection for production ML models. Cutting-edge performance in a wrapper, for free.
pip install canary-ml<br>copy
Keras/TensorFlow: pip install canary-ml[keras]
confidence_score · batch #2847
baseline
current
stable
PSI score
0.02
KS statistic
0.04
anomaly rate
0.8%
line to wrap any sklearn or Keras model
infrastructure required — runs fully local
from install to live monitoring dashboard
Data Drift Detection<br>KS test, PSI, chi-square per feature with configurable thresholds.
Anomaly Detection<br>Isolation Forest + z-score ensemble on inputs. KS test on prediction outputs.
Async Monitoring<br>Monitoring runs in a background thread. Your inference latency is unaffected.
Live Dashboard<br>Zero-dep HTML/JS dashboard. Ships with the package. No cloud account needed.
monitor_example.py
from canary_ml import ModelMonitor
monitor = ModelMonitor(<br>model=your_model,<br>reference_data=X_train,<br>alert_threshold=0.2,<br>log_path="./canary_logs"
# drop-in replacement — monitoring is a side effect<br>predictions = monitor.predict(X_new)
report = monitor.get_report()<br>print(report.psi_score, report.drift_detected, report.anomaly_rate)<br># 0.41 True 0.032
monitor.serve_dashboard(port=8501)