Skip to main content

🛡️ DriftGuard AI

Self-Healing MLOps & Autonomous Retraining Platform

PyPI version License: MIT


DriftGuard is a production-grade observability platform that detects data drift, concept drift, and model degradation in real-time, automatically triggering CI/CD retraining loops (like Apache Airflow) to heal your AI pipelines with zero human intervention.

🌟 Features

  • Real-Time Telemetry: Asynchronous, non-blocking telemetry logging that adds zero latency to your inference APIs.
  • Enterprise Dashboard: A stunning, Vercel-inspired observability dashboard to monitor your entire fleet of models in real-time.
  • Self-Healing Webhooks: Automatically fire POST payloads to your orchestrator (Airflow, Kubeflow, SageMaker) when SLA thresholds are breached.
  • Multi-Tenant Security: Securely isolate telemetry data by project using hashed API keys.

🚀 Quickstart: Bring Your Own Server

You can run the entire DriftGuard platform on your own infrastructure for free using Docker.

1. Start the Platform

Clone this repository and spin up the backend and frontend simultaneously using our highly optimized, pre-built Docker Hub images:

git clone https://github.com/Yugenjr/DriftGuard-AI-Sdk.git
cd DriftGuard-AI-Sdk/infra
docker-compose -f docker-compose.prod.yml up -d

Your dashboard is now live at http://localhost:3000! Go create your first API key.

2. Install the SDK

Install the lightweight Python SDK into your inference environment:

pip install driftguard-ai-sdk

3. Wrap your Model

Import the SDK and initialize it in your FastAPI/Flask app:

from fastapi import FastAPI
from driftguard import DriftGuard

# 1. Initialize DriftGuard
dg = DriftGuard(
    model_id="fraud-detector-v1",
    api_key="dg-your-secret-key",
    drift_threshold=0.15,
    expected_features=["amount", "location_score", "velocity"]
)

app = FastAPI()

@app.post("/predict")
def predict(features: list[float]):
    prediction = model.predict([features])
    
    # 2. Log telemetry asynchronously (Non-blocking)
    dg.log_prediction(
        features=features,
        prediction=prediction
    )
    
    return {"fraud_probability": prediction}

🏗 Architecture

DriftGuard is composed of three main components:

  1. The Python SDK (driftguard/): A lightweight client that intercepts inferences and streams telemetry.
  2. The FastAPI Engine (main.py): A high-concurrency event processor backed by PostgreSQL for state management.
  3. The Obsidian Dashboard (dashboard/): A Next.js (React) front-end providing a breathtaking developer experience.

🤝 Contributing

We welcome contributions! Please see our Contributing Guide for details on how to set up your local development environment.

📄 License

This project is licensed under the MIT License - see the LICENSE file for 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_ai_sdk-1.0.3.tar.gz (37.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_ai_sdk-1.0.3-py3-none-any.whl (22.6 kB view details)

Uploaded Python 3

File details

Details for the file driftguard_ai_sdk-1.0.3.tar.gz.

File metadata

  • Download URL: driftguard_ai_sdk-1.0.3.tar.gz
  • Upload date:
  • Size: 37.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for driftguard_ai_sdk-1.0.3.tar.gz
Algorithm Hash digest
SHA256 753a60e16d24a87635718312a2012e19e0095b89914364c04ba1e96fe43c3ae8
MD5 5a628f061f18cf9be29ce6d0b4c18b93
BLAKE2b-256 885b9a0b944594b58185833462cc08bf134c9dd29678774f3ca2192d2031f0b3

See more details on using hashes here.

File details

Details for the file driftguard_ai_sdk-1.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for driftguard_ai_sdk-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1feafda95d9a095e156268d0aafbfbd308b6961fb3eb5b167990680005974a15
MD5 602de6b8f4959fd3be2e3f6e2f991dae
BLAKE2b-256 b05e6a9977aa0875583f5f20af9c4b768732082991beb2ea383f6e7d92ca682e

See more details on using hashes here.

Release history Release notifications | RSS feed

1.0.4

2 files

This release

1.0.3 This release

2 files

1.0.2

2 files

1.0.1

2 files

1.0.0

2 files

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