Skip to main content

modelpulse-sdk

ML model monitoring for developers. One decorator. Live drift detection, AI diagnosis, and instant alerts — in 60 seconds.

PyPI version Python License: MIT


What is ModelPulse?

ModelPulse monitors your ML models in production. It detects when your model's input data starts looking different from what it was trained on (data drift), generates AI-powered plain-English explanations of what changed, and fires Slack/email alerts — automatically.

No MLOps team required. No schema design. No enterprise sales call.


Installation

pip install modelpulse-sdk

Quickstart

import modelpulse

# Initialize once at startup
modelpulse.init(
    api_key="mp_live_xxxx",       # from dashboard → model → API Keys
    model_id="your-model-uuid",   # from dashboard
)

# Wrap your predict function with one decorator
@modelpulse.monitor
def predict(features: dict):
    return my_model.predict([features])[0]

# That's it — ModelPulse logs every prediction automatically
result = predict({"age": 34, "income": 72000, "tenure_months": 12})

ModelPulse will:

  • Log every prediction (inputs, outputs, confidence, latency)
  • Compute drift hourly against your baseline distribution
  • Generate an AI diagnosis when drift is detected
  • Fire Slack/email alerts with the diagnosis included

How it works

1. Batching

Predictions are queued in memory and flushed every 10 seconds or when 50 accumulate — whichever comes first. This means zero blocking on your model's critical path.

2. Non-blocking

The SDK uses a background thread. Your predict() function adds less than 1ms overhead.

3. Resilient

Network failures are silently dropped. The SDK never raises an exception that could crash your application.


Advanced usage

Return confidence scores

@modelpulse.monitor
def predict(features: dict):
    probs = model.predict_proba([features])[0]
    # Return (prediction, confidence) tuple
    return probs.argmax(), float(probs.max())

Custom API URL (self-hosted)

modelpulse.init(
    api_key="mp_live_xxxx",
    model_id="your-model-uuid",
    api_url="https://your-own-api.com/api/v1",
)

Works with any framework

# scikit-learn
@modelpulse.monitor
def predict(features):
    return sklearn_model.predict([list(features.values())])[0]

# XGBoost
@modelpulse.monitor
def predict(features):
    dmatrix = xgb.DMatrix([list(features.values())])
    return float(xgb_model.predict(dmatrix)[0])

# PyTorch
@modelpulse.monitor
def predict(features):
    tensor = torch.tensor(list(features.values()))
    return torch_model(tensor).item()

Drift Detection

ModelPulse uses two statistical tests under the hood:

Test What it measures
PSI (Population Stability Index) Magnitude of distribution shift
KS Test (Kolmogorov-Smirnov) Whether two distributions are different
PSI Score Health Status
< 0.10 🟢 Healthy — no significant drift
0.10 – 0.20 🟡 Warning — moderate drift
> 0.20 🔴 Critical — significant drift

You never need to configure these thresholds manually — ModelPulse computes them automatically from your first 100 predictions.


Dashboard

After integrating the SDK, view your model's health at:

👉 https://frontend-ruddy-sigma-92.vercel.app

The dashboard shows:

  • Feature drift scores with visual progress bars
  • AI-generated plain-English diagnosis (powered by Claude)
  • Prediction volume and latency trends
  • Alert history

Configuration options

modelpulse.init(
    api_key="mp_live_xxxx",      # required — your API key
    model_id="uuid",             # required — your model ID
    api_url="https://...",       # optional — default: ModelPulse cloud
    timeout=5,                   # optional — HTTP timeout in seconds
    batch_size=50,               # optional — flush after N predictions
    async_mode=True,             # optional — fire-and-forget mode
)


License

MIT License — see LICENSE for details.


Built by Saxon Preetham · Visakhapatnam, India · 2026

Metadata

Release files for modelpulse-sdk 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for modelpulse-sdk 0.2.0
File Size Uploaded Provenance Actions
modelpulse_sdk-0.2.0.tar.gz 10.9 kB Without provenance Details for modelpulse_sdk-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for modelpulse-sdk 0.2.0
File Interpreter ABI Platform Actions
modelpulse_sdk-0.2.0-py3-none-any.whl Python 3 none any Details for modelpulse_sdk-0.2.0-py3-none-any.whl

Total release size: 20.7 kB

Release files / modelpulse_sdk-0.2.0.tar.gz

Download URL modelpulse_sdk-0.2.0.tar.gz
Size 10.9 kB
Tags Source
SHA-256 checksum
How to use checksums
363148e659d90b35bd9513bf7528472472429b60019b35f72bcc51c12a007517
BLAKE2b-256 checksum
How to use checksums
02caf5ee8698845d0a66e7e5604beb920b7c6cd05cbbbe23305a1ff71aca1199
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.5

Release files / modelpulse_sdk-0.2.0-py3-none-any.whl

Download URL modelpulse_sdk-0.2.0-py3-none-any.whl
Size 9.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
719aa2dc4efa5213170d441604ad0dfed80381a2595420497cc2e93af07ae824
BLAKE2b-256 checksum
How to use checksums
851e13fec6d5393ef1fa7d4c10d08e03744998628219812290cee472ab9220c2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.5

Security for modelpulse-sdk 0.2.0

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page