Skip to main content

Zero-configuration adversarial robustness testing for ML models

Project description

PyArmour

PyPI License CI

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


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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyarmour-0.1.0-py3-none-any.whl (16.3 kB view details)

Uploaded Python 3

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

Hashes for pyarmour-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6119b6fd29e971a20b64868c6cf166a9664111d87614aae7e571fb111564f97a
MD5 4d57f04149d34873cf9337a9133eaa09
BLAKE2b-256 62ead8768aff119334c4887c86f3d7a9602eb4420c0d16fa6e7d3c3daebf2237

See more details on using hashes here.

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

Hashes for pyarmour-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4710e8911d1994ca85ecb11c517ff2d9281da053009fc8ccd4befdd10ea5b969
MD5 edf4fe35d4d38974c83eb4ea8a4c65a9
BLAKE2b-256 502c0c70f42d39590cdc31b54740eaebccbb72fd58a5f6372b8a3d596d063675

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page