Installation¶
Requirements¶
- Python 3.10+
- PyTorch 2.x
- macOS (MPS), Linux (CUDA), or CPU
Install from PyPI¶
Install from source¶
git clone https://github.com/EemanAsghar/AuditML-Privacy-Toolkit.git
cd AuditML-Privacy-Toolkit
pip install -e ".[dev]"
The [dev] extra installs pytest, ruff, and mkdocs tooling.
Optional: Rust acceleration¶
AuditML ships a Rust extension that speeds up threshold scanning (~11× faster) and SSIM computation (~3× faster). It falls back to NumPy automatically if unavailable.
Prerequisites¶
-
Install Rust (one-time, global):
-
Install maturin inside your virtual environment:
Build and install the extension¶
cd rust
maturin build --release --out ../dist
pip install ../dist/auditml_rust-*.whl --force-reinstall
To verify:
from auditml.utils.rust_accel import rust_status
print(rust_status())
# Rust extension available (auditml_rust vX.Y.Z)
Verify the full install¶
Dependencies¶
| Package | Purpose |
|---|---|
torch |
Model training and inference |
torchvision |
Datasets and transforms |
opacus |
Differential Privacy |
scikit-learn |
Metrics (AUC, F1, …) |
numpy |
Array operations |
matplotlib |
Plots |
tqdm |
Progress bars |
pyyaml |
Config parsing |