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
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.3.tar.gz
(19.4 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.3-py3-none-any.whl
(20.1 kB
view details)
File details
Details for the file pyarmour-0.1.3.tar.gz.
File metadata
- Download URL: pyarmour-0.1.3.tar.gz
- Upload date:
- Size: 19.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
077eac457371b489515b750f15d999262d2fec9188e5a01e0bfbbae39f833395
|
|
| MD5 |
7cfce1f0a9a1320b03fd2cb77bdb9976
|
|
| BLAKE2b-256 |
104d4b96428475cfd0ad4ac10cdd1c35a013a53cbd74efcd7f2fe8fbe201b4f0
|
File details
Details for the file pyarmour-0.1.3-py3-none-any.whl.
File metadata
- Download URL: pyarmour-0.1.3-py3-none-any.whl
- Upload date:
- Size: 20.1 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 |
c0a09bd2158fe409a317efe1dd1108f7459718152e648ae676df1d7649bc45d2
|
|
| MD5 |
a4c18dcb03dfff72a7a653d1fe3ba151
|
|
| BLAKE2b-256 |
395bb7f6a5ef6a53561df4bc8670fedbff8cc466a861a49a9120328f73780446
|