ModelSentry
Early warning when your production ML models start degrading.
ModelSentry computes statistical profiles of your model's inputs and outputs locally — nothing leaves your machine. When feature distributions drift from baseline, you get an alert before your stakeholders notice.
PSI 0.83 ↑ income CRITICAL
PSI 2.43 ↑ age CRITICAL
PSI 0.01 tenure stable
PSI 0.00 country stable
Install
pip install modelsentry
Requires Python 3.11+. No Docker. No cloud account. No infrastructure.
Quickstart
import modelsentry as ms
ms.init(model_id="churn-v3", profile_window=500)
@ms.monitor()
def predict(features_df):
return model.predict(features_df)
Then start the local dashboard:
modelsentry serve --model churn-v3 --alert-email you@company.com
Open http://localhost:8080 to see live drift scores, feature distributions vs. baseline, and alert history. The dashboard updates every 60 seconds and shows an explicit "all systems nominal" state when no drift is detected — so you always know the system is alive.
How it works
ModelSentry runs as two independent processes — you don't need both running at the same time.
In your model (SDK side)
@ms.monitor() captures inputs and outputs on every predict() call. Every 500
predictions (configurable via profile_window), it computes a statistical profile
on a background thread and saves it to ~/.modelsentry/{model_id}/. The first
profile is automatically saved as the baseline. Your predict function is not blocked
— monitoring overhead is under 1ms.
In your browser (dashboard side)
modelsentry serve reads those profile files whenever you open it. You don't need
the dashboard running continuously — just open it when you want to check in, or
after receiving a drift alert email. It auto-refreshes every 60 seconds.
Storage: roughly 5–20 KB per profile. At 10,000 predictions/day with
profile_window=500, that's ~20 profiles/day — around 200–400 KB/day.
Configuration
Email alerts via CLI
modelsentry serve \
--model churn-v3 \
--alert-email you@company.com \
--smtp-host smtp.gmail.com \
--smtp-port 587 \
--smtp-user you@gmail.com \
--smtp-password "your-app-password"
Custom storage location
ms.init(
model_id="churn-v3",
profile_window=500,
storage_path="/data/modelsentry",
)
Dashboard
The local dashboard at localhost:8080 shows:
- Model health overview (green / yellow / red)
- Prediction volume — total monitored since install
- Per-feature distribution charts vs. baseline
- PSI and KS drift scores, color-coded by severity
- Last updated timestamp (auto-refreshes every 60 seconds)
- Alert history with timestamps
- Explicit "all systems nominal" state when no drift is detected
Links
- Website: getmodelsentry.com
- GitHub: github.com/treyhamilton/modelsentry
License
MIT
Metadata
Release files for modelsentry 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| modelsentry-0.1.1.tar.gz | 21.6 kB | Without provenance | Details for modelsentry-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| modelsentry-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for modelsentry-0.1.1-py3-none-any.whl |
Total release size: 46.6 kB
Release files / modelsentry-0.1.1.tar.gz
| Download URL | modelsentry-0.1.1.tar.gz |
|---|---|
| Size | 21.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
982c349f434484711a751407a0d73e13b706463a70d503487f3d309b90cbaf48
|
|
BLAKE2b-256 checksum How to use checksums |
94abed43259348cca8cb6e869482293be06e941df73adc0c6e2798ed14070881
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.4.0 CPython/3.11.9 Darwin/25.4.0
|
Release files / modelsentry-0.1.1-py3-none-any.whl
| Download URL | modelsentry-0.1.1-py3-none-any.whl |
|---|---|
| Size | 25.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3ed76f11610077a6933781bc8f7750b05e8245f5fd318832d45be7c32c945f93
|
|
BLAKE2b-256 checksum How to use checksums |
0722778d1e09199d6aa88f4e65def1c17aeffc903f2d8f174e1cc4819c5d8a03
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.4.0 CPython/3.11.9 Darwin/25.4.0
|
Security for modelsentry 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.