Skip to main content

Enterprise-grade real-time ML model drift monitoring

Project description

DriftGuard 🛡️

Enterprise-grade real-time ML model drift monitoring.

DriftGuard is a professional Python library designed for MLOps Engineers and Data Scientists to detect Data Drift and Concept Drift in production environments.

Features

  • Statistical Drift Detection: Built-in support for Kolmogorov-Smirnov Test and Population Stability Index (PSI).
  • Extensible: Easy to create custom detectors by inheriting from BaseDetector.
  • Alerting System: Built-in Webhook integration to send real-time alerts to Slack, Microsoft Teams, etc.

Installation

You can install DriftGuard locally:

pip install -e .

Quick Start

import numpy as np
from driftguard.detectors.ks_drift import KSDriftDetector

# 1. Reference Data (e.g. from your Training Set)
reference_data = np.random.normal(0, 1, 1000)

# 2. Initialize and fit the detector
detector = KSDriftDetector(threshold=0.05)
detector.fit(reference_data)

# 3. New Data (e.g. Production Data)
current_data = np.random.normal(1.5, 1.5, 1000)

# 4. Detect Drift
report = detector.detect(current_data)

print(report)
# {0: {'detector': 'Kolmogorov-Smirnov Test', 'drift_detected': True, 'metrics': {'ks_statistic': ..., 'p_value': ...}, 'threshold': 0.05}}

Running Tests

To run the unit tests:

pip install pytest
pytest tests/

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

driftguard_mehosni-0.1.2.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

driftguard_mehosni-0.1.2-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file driftguard_mehosni-0.1.2.tar.gz.

File metadata

  • Download URL: driftguard_mehosni-0.1.2.tar.gz
  • Upload date:
  • Size: 7.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for driftguard_mehosni-0.1.2.tar.gz
Algorithm Hash digest
SHA256 e09d03712362d1b940056605f8004fe0d67b122d1e9667d82c36573e0f0c0661
MD5 9dc3d058fdab901adef9eb2fca76ca8f
BLAKE2b-256 a948c3f4bf2ca95f61c4f0fa1e76c95926e8719be5a871b8a912691535f8e8f6

See more details on using hashes here.

File details

Details for the file driftguard_mehosni-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for driftguard_mehosni-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3e6343e5598f2cb8f2698e2a30fb1ecb2f37de52790ce1ba43cda90a3a6e2fd3
MD5 23f9bc3d3d069cb3919ca23b61045377
BLAKE2b-256 8572477fa375d44bebf2bf1813d2e53456f7ae08011122af3d922aedbe7616ab

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page