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
Metadata
Release files for auratest 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| auratest-0.1.2.tar.gz | 5.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| auratest-0.1.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.0 kB
Release files / auratest-0.1.2.tar.gz
| Download URL | auratest-0.1.2.tar.gz |
|---|---|
| Size | 5.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f2ddaba19cefc0ec8ad9961a05e911aff547e2f299ab89282dcfb5d41c48bf2c
|
|
BLAKE2b-256 checksum How to use checksums |
aadc72399982d423c0e79a3debb0edd0e43ae93e7bcde8c3dc0ce83a3a1536a1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 21, 2026.
Transparency logRelease files / auratest-0.1.2-py3-none-any.whl
| Download URL | auratest-0.1.2-py3-none-any.whl |
|---|---|
| Size | 5.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
13dd853862bf97c1171af5f3117898c7be65169834e08f3f3f330ac00b3c7c7a
|
|
BLAKE2b-256 checksum How to use checksums |
90350e4e54b58abcd29193d0fca72b6bb8a90530874b9609c28b4484f0cc98c9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 21, 2026.
Transparency log