Skip to content

Get Started

Beat Buesser edited this page Jun 10, 2020 · 10 revisions

Setup

Installation with pip

The toolbox is designed and tested to run with Python 3. ART can be installed from the PyPi repository using pip:

pip install adversarial-robustness-toolbox

Manual installation

The most recent version of ART can be downloaded or cloned from this repository:

git clone https://github.com/IBM/adversarial-robustness-toolbox

Install ART with the following command from the project folder adversarial-robustness-toolbox:

Using pip:

pip install .

Using Docker:

  • Build the ART docker image: make build
  • To enter the ART docker environment run: make run-bash
  • To run the Jupyter notebooks from the container run make run-jupyter and copy and paste the url generated
    to connect to that container.

Running ART Unit tests

ART provides unit tests that can be ran within the ART environment. The first time the tests are ran, ART will download the necessary datasets so it might take a while to do so.

  • Note: If you wish to run the unit tests using the TensorFlow 1 environment simply comment out the TensorFlow 2
    packages within either the requirements.txt or Dockerfile as needed

Use the following commands to run the tests:

Using pip:

pip install -r requirements.txt
bash run_tests.sh

Using Docker: make run-test

Getting Started with ART

Examples of using ART can be found in examples and examples/README.md provides an overview and additional information. It contains a minimal example for each machine learning framework. All examples can be run with the following command:

python examples/<example_name>.py

More detailed examples and tutorials are located in notebooks and notebooks/README.md provides and overview and more information.

Clone this wiki locally