Skip to content
AI News HubLIVE
More
In-site rewrite1 min read

Show HN: A lightweight model monitor for scikit-learn and Keras

Summary

Canary is a free, lightweight Python library for monitoring ML models in production, detecting drift and anomalies with minimal setup.

SourceHacker News AIAuthor: aitor1717
Show HN: A lightweight model monitor for scikit-learn and Keras
Report an error

The correction channel is not available yet. You can copy the article reference below for later.

Correction instructions
Read article

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

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%

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.

monitor_example.py

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)

Key points and analysis

Article intelligence

EngineersIntermediate

Key points

  • Easy integration with sklearn and Keras models
  • Real-time drift detection using KS test, PSI, and chi-square
  • Anomaly detection with Isolation Forest and z-score ensemble
  • Zero-infrastructure local dashboard

Highlights and analysis are generated automatically and may contain errors. Check the original source.