Skip to main content

Zero-false-positive data drift detection with Cython-optimized performance

Project description

driftfx

🚦 Zero-false-positive drift detection for analytics pipelines.

Fast: Optimized with Cython - handles 10,000+ unique values in under 2 seconds.
Flexible: Works with both CSV and Parquet files.

⚠️ Early Stage Project: This project is in active development with frequent breaking changes. The API and data formats may change between versions. Please pin your dependencies if using in production.

Get Started

pip install driftfx

Python Usage

import pandas as pd, driftfx as dr

dr.snapshot(df_baseline, "baseline", cols=["name"])
result = dr.check(df_new, "baseline", cols=["name"])

if not result.is_clean():
    if result.renames:
        print("Renames / typos:", result.renames[:5])     # first 5 examples
    if result.brand_new:
        print("Brand-new names:", result.brand_new[:5])   # first 5 examples

CLI Usage

# snapshot baseline (CSV or Parquet)
$ driftfx snapshot --input data.csv --cols name --baseline baseline/
$ Snapshot complete # check new batch
$ driftfx check --input new.parquet --cols name --baseline baseline/
$ [] name: 17 renames / 31 new codes
$ Drift detected: 48 anomalies 

Performance

With Cython-optimized Levenshtein distance calculations:

Operation Time Throughput Dataset
Snapshot 1.6s 5,264 rows/s 10,000 unique values
Check 1.2s 7,893 rows/s 10,050 rows

The Cython implementation provides an 8x speedup for snapshot operations compared to pure Python.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

driftfx-0.1.1-cp39-cp39-macosx_14_0_x86_64.whl (86.8 kB view details)

Uploaded CPython 3.9macOS 14.0+ x86-64

File details

Details for the file driftfx-0.1.1-cp39-cp39-macosx_14_0_x86_64.whl.

File metadata

File hashes

Hashes for driftfx-0.1.1-cp39-cp39-macosx_14_0_x86_64.whl
Algorithm Hash digest
SHA256 48723e4c462fb44ed923c632808f1a021fe05787a7a4414f0ab3bde2841333ce
MD5 8f9ed4f6bf762fe3e4b71e19e9946c08
BLAKE2b-256 0507af93c936ac427d5b84bf0f31cfa610c08243ec2d42f385dd5e2f9512a273

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