Zero-configuration adversarial robustness testing for ML models
Project description
PyArmour
Zero-configuration adversarial robustness testing for ML models using pytest.
Installation
pip install pyarmour
Quick Start
Decorator Usage
import pytest
from pyarmour import adversarial_test
@adversarial_test(model, attacks=["fgsm", "pgd"], epsilons=[0.03, 0.1])
def test_my_model(model, x, y):
assert model(x).argmax() == y
CLI Usage
pyarmour run --model-path model.pth --data-path test_data/ --output report.html
Features
- Zero-configuration adversarial testing via pytest
- Pure NumPy implementation - no framework dependencies
- Built-in attacks: FGSM, PGD, DeepFool
- Visual diagnostics for vision models
- Text diff reports for NLP models
Documentation
Full documentation available at pyarmour.readthedocs.io
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyarmour-0.1.0.tar.gz
(10.9 kB
view details)
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
pyarmour-0.1.0-py3-none-any.whl
(16.3 kB
view details)
File details
Details for the file pyarmour-0.1.0.tar.gz.
File metadata
- Download URL: pyarmour-0.1.0.tar.gz
- Upload date:
- Size: 10.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6119b6fd29e971a20b64868c6cf166a9664111d87614aae7e571fb111564f97a
|
|
| MD5 |
4d57f04149d34873cf9337a9133eaa09
|
|
| BLAKE2b-256 |
62ead8768aff119334c4887c86f3d7a9602eb4420c0d16fa6e7d3c3daebf2237
|
File details
Details for the file pyarmour-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pyarmour-0.1.0-py3-none-any.whl
- Upload date:
- Size: 16.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4710e8911d1994ca85ecb11c517ff2d9281da053009fc8ccd4befdd10ea5b969
|
|
| MD5 |
edf4fe35d4d38974c83eb4ea8a4c65a9
|
|
| BLAKE2b-256 |
502c0c70f42d39590cdc31b54740eaebccbb72fd58a5f6372b8a3d596d063675
|