The Problem: Fragile AI Deployments
Data Scientists rarely write Unit Tests because AI models are probabilistic. You cannot easily assert output == 5. Because of this, biased, illogical, and fragile models often leak into production undetected.
The Solution: AuraTest
AuraTest allows you to test the mathematical invariants of your model rather than point outputs. It ensures your AI obeys the laws of physics, logic, and fairness before it is ever deployed.
Installation
Install AuraTest easily via pip:
pip install auratest
(Requires numpy to be installed in your environment).
Quick Start (pytest)
import numpy as np
from auratest import assert_monotonic, assert_invariance
def test_credit_model_is_logical():
# 1. Your trained model's predict function
def predict_risk(X):
return my_model.predict(X)
sample_data = np.random.rand(10, 5) # 10 patients, 5 features
# 2. Ensure that as Feature 2 (Age) increases, Risk strictly increases.
assert_monotonic(predict_risk, sample_data, feature_index=2, direction="increasing")
def test_credit_model_is_fair():
# 3. Ensure that altering Feature 0 (Gender) does NOT change predictions by > 1%
assert_invariance(predict_risk, sample_data, feature_index=0, tolerance=0.01)
How It Works (Production Features)
AuraTest acts as an independent testing engine wrapping your model's outputs.
- Anti-OOM Generator Engine: Instead of hoarding memory, the perturbation engine uses batch generators. You can test gigabytes of synthetic data without crashing your CI/CD runners.
- Safe Model Adapters: Automatically intercepts and coerces arbitrary model outputs (whether it is a Pandas DataFrame, a PyTorch Tensor, or a Scikit-Learn Multiclass Probability array) into pure NumPy formats to ensure zero crashes during shape operations.
- Strict & Customizable Math Bounds: Exposes deep parameters (
steps,step_size,noise_std) and features astrictmonotonicity mode to cater to rigorous compliance and audit requirements.
Support This Project
AuraTest is an open-source project built out of passion. If it has saved you from deploying a biased or broken model into production, consider supporting the creator by following on Instagram!
Contributing & Testing
We welcome PRs! To run the test suite locally and verify your changes:
# Clone the repository
git clone https://github.com/ginganomercy/auratest.git
cd auratest
# Install with development dependencies
pip install -e .[dev]
# Run tests
pytest tests/ -v
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file auratest-0.1.2.tar.gz.
File metadata
- Download URL: auratest-0.1.2.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f2ddaba19cefc0ec8ad9961a05e911aff547e2f299ab89282dcfb5d41c48bf2c
|
|
| MD5 |
34102bed716fb06807ff4dee66df6b5a
|
|
| BLAKE2b-256 |
aadc72399982d423c0e79a3debb0edd0e43ae93e7bcde8c3dc0ce83a3a1536a1
|
Provenance
The following attestation bundles were made for auratest-0.1.2.tar.gz:
Publisher:
publish.yml on ginganomercy/auratest
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
auratest-0.1.2.tar.gz -
Subject digest:
f2ddaba19cefc0ec8ad9961a05e911aff547e2f299ab89282dcfb5d41c48bf2c - Sigstore transparency entry: 2209074875
- Sigstore integration time:
-
Permalink:
ginganomercy/auratest@5484d8c0c10336f98204fbeda587b94fcd4dc8fe -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/ginganomercy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5484d8c0c10336f98204fbeda587b94fcd4dc8fe -
Trigger Event:
push
-
Statement type:
File details
Details for the file auratest-0.1.2-py3-none-any.whl.
File metadata
- Download URL: auratest-0.1.2-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
13dd853862bf97c1171af5f3117898c7be65169834e08f3f3f330ac00b3c7c7a
|
|
| MD5 |
293818bc5dbe8b06d1be7787227a86fc
|
|
| BLAKE2b-256 |
90350e4e54b58abcd29193d0fca72b6bb8a90530874b9609c28b4484f0cc98c9
|
Provenance
The following attestation bundles were made for auratest-0.1.2-py3-none-any.whl:
Publisher:
publish.yml on ginganomercy/auratest
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
auratest-0.1.2-py3-none-any.whl -
Subject digest:
13dd853862bf97c1171af5f3117898c7be65169834e08f3f3f330ac00b3c7c7a - Sigstore transparency entry: 2209074891
- Sigstore integration time:
-
Permalink:
ginganomercy/auratest@5484d8c0c10336f98204fbeda587b94fcd4dc8fe -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/ginganomercy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@5484d8c0c10336f98204fbeda587b94fcd4dc8fe -
Trigger Event:
push
-
Statement type: