Skip to content

Commit c311a4b

Browse files
authored
Merge pull request #775 from Trusted-AI/dev_1.5.0
Update to ART 1.5.0
2 parents 3cf890d + 01f75c3 commit c311a4b

File tree

317 files changed

+20082
-5211
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

317 files changed

+20082
-5211
lines changed

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,9 @@ updates:
1111
interval: "daily"
1212
assignees:
1313
- "beat-buesser"
14+
- package-ecosystem: "github-actions"
15+
directory: "/"
16+
schedule:
17+
interval: "daily"
18+
assignees:
19+
- "beat-buesser"

.github/workflows/ci.yml

Lines changed: 90 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,32 +25,108 @@ jobs:
2525
fail-fast: false
2626
matrix:
2727
include:
28-
- python: 3.6
29-
tensorflow: 1.15.3
28+
- name: TensorFlow 1.15.4 (Keras 2.2.5 Python 3.7)
29+
framework: tensorflow
30+
python: 3.7
31+
tensorflow: 1.15.4
32+
tf_version: v1
3033
keras: 2.2.5
31-
- python: 3.7
34+
- name: TensorFlow 2.2.0 (Keras 2.3.1 Python 3.7)
35+
framework: tensorflow
36+
python: 3.7
3237
tensorflow: 2.2.0
38+
tf_version: v2
3339
keras: 2.3.1
34-
name: Run Tests (Python ${{ matrix.python }})
40+
- name: TensorFlow 2.2.0v1 (Keras 2.3.1 Python 3.7)
41+
framework: tensorflow2v1
42+
python: 3.7
43+
tensorflow: 2.2.0
44+
tf_version: v2
45+
keras: 2.3.1
46+
- name: TensorFlow 2.3.1 (Keras 2.4.3 Python 3.7)
47+
framework: tensorflow
48+
python: 3.7
49+
tensorflow: 2.3.1
50+
tf_version: v2
51+
keras: 2.4.3
52+
- name: TensorFlow 2.4.0rc3 (Keras 2.4.3 Python 3.8)
53+
framework: tensorflow
54+
python: 3.8
55+
tensorflow: 2.4.0rc3
56+
tf_version: v2
57+
keras: 2.4.3
58+
- name: Keras 2.3.1 (TensorFlow 2.2.1 Python 3.7)
59+
framework: keras
60+
python: 3.7
61+
tensorflow: 2.2.1
62+
keras: 2.3.1
63+
- name: TensorFlow-Keras 2.3.1 (Keras 2.4.3 Python 3.7)
64+
framework: kerastf
65+
python: 3.7
66+
tensorflow: 2.3.1
67+
keras: 2.4.3
68+
- name: PyTorch (Python 3.7)
69+
framework: pytorch
70+
python: 3.7
71+
- name: scikit-learn 0.22.2 (Python 3.7)
72+
framework: scikitlearn
73+
scikit-learn: 0.22.2
74+
python: 3.7
75+
- name: scikit-learn 0.23.2 (Python 3.8)
76+
framework: scikitlearn
77+
scikit-learn: 0.23.2
78+
python: 3.8
79+
- name: mxnet (Python 3.7)
80+
framework: mxnet
81+
python: 3.7
82+
- name: legacy (TensorFlow 2.2.1 Keras 2.3.1 scikit-learn 0.22.2 Python 3.7)
83+
framework: legacy
84+
python: 3.7
85+
tensorflow: 2.2.1
86+
keras: 2.3.1
87+
scikit-learn: 0.22.2
88+
- name: legacy (TensorFlow 2.3.1 Keras 2.4.3 scikit-learn 0.23.2 Python 3.8)
89+
framework: legacy
90+
python: 3.8
91+
tensorflow: 2.3.1
92+
keras: 2.4.3
93+
scikit-learn: 0.23.2
94+
95+
name: Run ${{ matrix.name }} Tests
3596
steps:
3697
- name: Checkout Repo
3798
uses: actions/checkout@v2
3899
- name: Setup Python
39100
uses: actions/setup-python@v2
40101
with:
41102
python-version: ${{ matrix.python }}
42-
- name: Pre-install
43-
run: |
44-
sudo apt-get -y -q install ffmpeg libavcodec-extra
45-
sed -i "s/^tensorflow$/tensorflow==${{ matrix.tensorflow }}/" requirements.txt
46-
sed -i "s/^keras$/keras==${{ matrix.keras }}/" requirements.txt
47103
- name: Install Dependencies
48104
run: |
105+
sudo apt-get update
106+
sudo apt-get -y -q install ffmpeg libavcodec-extra
49107
python -m pip install --upgrade pip setuptools wheel
50108
pip3 install -q -r requirements.txt
51109
pip list
52-
- name: Run Tests
53-
run: ./run_tests.sh
110+
- name: Pre-install legacy
111+
if: ${{ matrix.framework == 'legacy' }}
112+
run: |
113+
pip install tensorflow==${{ matrix.tensorflow }}
114+
pip install keras==${{ matrix.keras }}
115+
pip install scikit-learn==${{ matrix.scikit-learn }}
116+
pip list
117+
- name: Pre-install tensorflow
118+
if: ${{ matrix.framework == 'tensorflow' || matrix.framework == 'keras' || matrix.framework == 'kerastf' }}
119+
run: |
120+
pip install tensorflow==${{ matrix.tensorflow }}
121+
pip install keras==${{ matrix.keras }}
122+
pip list
123+
- name: Pre-install scikit-learn
124+
if: ${{ matrix.framework == 'scikitlearn' }}
125+
run: |
126+
pip install scikit-learn==${{ matrix.scikit-learn }}
127+
pip list
128+
- name: Run ${{ matrix.name }} Tests
129+
run: ./run_tests.sh ${{ matrix.framework }}
54130
style:
55131
name: Style Check
56132
runs-on: ubuntu-latest
@@ -63,9 +139,10 @@ jobs:
63139
python-version: 3.7
64140
- name: Pre-install
65141
run: |
142+
sudo apt-get update
66143
sudo apt-get -y -q install ffmpeg libavcodec-extra
67-
sed -i "s/^tensorflow$/tensorflow==2.2.0/" requirements.txt
68-
sed -i "s/^keras$/keras==2.3.1/" requirements.txt
144+
pip install tensorflow==2.2.0
145+
pip install keras==2.3.1
69146
- name: Install Dependencies
70147
run: |
71148
python -m pip install --upgrade pip setuptools wheel

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,3 +113,4 @@ demo/pics/*
113113
!notebooks/*.ipynb
114114
!notebooks/adaptive_defence_evaluations/*.ipynb
115115
!notebooks/adversarial_patch/*.ipynb
116+
!notebooks/art_evaluations/*.ipynb

.travis.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

CODE_OF_CONDUCT.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
The Adversarial Robustness Toolbox is dedicated to providing a harassment-free experience for everyone, regardless of gender, gender identity and expression, sexual orientation, disability, physical appearance, body size, age, race, or religion. We do not tolerate harassment of participants in any form.
1+
The Adversarial Robustness Toolbox (ART) is dedicated to providing a harassment-free experience for everyone, regardless of gender, gender identity and expression, sexual orientation, disability, physical appearance, body size, age, race, or religion. We do not tolerate harassment of participants in any form.
22

3-
This code of conduct applies to all Adversarial Robustness Toolbox spaces, both online and off. Anyone who violates this code of conduct may be sanctioned or expelled from these spaces at the discretion of the IBM Research AI team.
3+
This code of conduct applies to all Adversarial Robustness Toolbox spaces, both online and off. Anyone who violates this code of conduct may be sanctioned or expelled from these spaces at the discretion of the Trusted-AI team.
44

55
We may add additional rules over time, which will be made clearly available to participants. Participants are responsible for knowing and abiding by these rules.

Dockerfile

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,23 @@ RUN pip3 install keras==2.3.1
44
#FROM tensorflow/tensorflow:1.15.2
55
#RUN pip3 install keras==2.2.5
66

7-
RUN pip3 install numpy==1.19.1 scipy==1.4.1 matplotlib==3.3.1 scikit-learn==0.22.2 six==1.15.0 Pillow==7.2.0
7+
RUN pip3 install numpy==1.19.1 scipy==1.4.1 matplotlib==3.3.1 scikit-learn==0.22.2 six==1.15.0 Pillow==7.2.0 pytest-cov==2.10.1
88
RUN pip3 install tqdm==4.48.2 statsmodels==0.11.1 pydub==0.24.1 resampy==0.2.2 ffmpeg-python==0.2.0 cma==3.0.3 mypy==0.770
9+
RUN pip3 install ffmpeg-python==0.2.0
910
RUN pip3 install pandas==1.1.1
1011

1112
#TODO check if jupyter notebook works
1213
RUN pip3 install jupyter==1.0.0 && pip3 install jupyterlab==2.1.0
1314
# https://stackoverflow.com/questions/49024624/how-to-dockerize-jupyter-lab
1415

16+
# Lingvo ASR dependencies
17+
# supported versions: (lingvo==0.6.4 with tensorflow-gpu==2.1.0)
18+
# note: due to conflicts with other TF1/2 version supported by ART, the dependencies are not installed by default:
19+
# Replace line 1 with: FROM tensorflow/tensorflow:2.1.0
20+
# Comment other TF related lines and uncomment:
21+
# RUN pip3 install tensorflow-gpu==2.1.0
22+
# RUN pip3 install lingvo==0.6.4
23+
1524
RUN pip3 install h5py==2.10.0
1625
RUN pip3 install tensorflow-addons==0.11.1
1726
RUN pip3 install mxnet==1.6.0
@@ -20,6 +29,7 @@ RUN pip3 install catboost==0.24
2029
RUN pip3 install GPy==1.9.9
2130
RUN pip3 install lightgbm==2.3.1
2231
RUN pip3 install xgboost==1.1.1
32+
RUN pip3 install kornia==0.3.1
2333

2434
RUN pip3 install pytest==5.4.1 pytest-pep8==1.0.6 pytest-mock==3.2.0 codecov==2.1.8 requests==2.24.0
2535

@@ -31,6 +41,9 @@ WORKDIR /project
3141
ADD . /project/
3242
RUN pip3 install --upgrade -r /project/requirements.txt
3343

44+
RUN apt-get update
45+
RUN apt-get -y -q install ffmpeg libavcodec-extra
46+
3447
RUN echo "You should think about possibly upgrading these outdated packages"
3548
RUN pip3 list --outdated
3649

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
PROJECT_HOME_DIR := ${CURDIR}
22

33
build:
4-
# Builds a Tensorflow 2 ART docker container
4+
# Builds a TensorFlow 2 ART docker container
55
# IMPORTANT ! If you have an existing python env folder make sure to first add it to the `.dockerIgnore` \
66
to reduce the size of your the art docker image
77
docker build -t project-art-tf2 .
88

99
build1:
10-
# Builds a Tensorflow 1 ART docker container
10+
# Builds a TensorFlow 1 ART docker container
1111
# IMPORTANT ! If you have an existing python env folder make sure to first add it to the `.dockerIgnore` \
1212
to reduce the size of your the art docker image
1313
docker build -t project-art-tf1 .

README-cn.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
</p>
55
<br />
66

7-
[![Build Status](https://travis-ci.com/Trusted-AI/adversarial-robustness-toolbox.svg?branch=main)](https://travis-ci.com/Trusted-AI/adversarial-robustness-toolbox)
7+
![Continuous Integration](https://github.com/Trusted-AI/adversarial-robustness-toolbox/workflows/Continuous%20Integration/badge.svg)
8+
![CodeQL](https://github.com/Trusted-AI/adversarial-robustness-toolbox/workflows/CodeQL/badge.svg)
89
[![Documentation Status](https://readthedocs.org/projects/adversarial-robustness-toolbox/badge/?version=latest)](http://adversarial-robustness-toolbox.readthedocs.io/en/latest/?badge=latest)
910
[![GitHub version](https://badge.fury.io/gh/Trusted-AI%2Fadversarial-robustness-toolbox.svg)](https://badge.fury.io/gh/Trusted-AI%2Fadversarial-robustness-toolbox)
1011
[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/Trusted-AI/adversarial-robustness-toolbox.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/Trusted-AI/adversarial-robustness-toolbox/context:python)

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
</p>
55
<br />
66

7-
[![Build Status](https://travis-ci.com/Trusted-AI/adversarial-robustness-toolbox.svg?branch=main)](https://travis-ci.com/Trusted-AI/adversarial-robustness-toolbox)
7+
![Continuous Integration](https://github.com/Trusted-AI/adversarial-robustness-toolbox/workflows/Continuous%20Integration/badge.svg)
8+
![CodeQL](https://github.com/Trusted-AI/adversarial-robustness-toolbox/workflows/CodeQL/badge.svg)
89
[![Documentation Status](https://readthedocs.org/projects/adversarial-robustness-toolbox/badge/?version=latest)](http://adversarial-robustness-toolbox.readthedocs.io/en/latest/?badge=latest)
910
[![GitHub version](https://badge.fury.io/gh/Trusted-AI%2Fadversarial-robustness-toolbox.svg)](https://badge.fury.io/gh/Trusted-AI%2Fadversarial-robustness-toolbox)
1011
[![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/Trusted-AI/adversarial-robustness-toolbox.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/Trusted-AI/adversarial-robustness-toolbox/context:python)

art/attacks/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"""
44
from art.attacks.attack import Attack, EvasionAttack, PoisoningAttack, PoisoningAttackBlackBox, PoisoningAttackWhiteBox
55
from art.attacks.attack import PoisoningAttackTransformer, ExtractionAttack, InferenceAttack, AttributeInferenceAttack
6+
from art.attacks.attack import ReconstructionAttack
67

78
from art.attacks import evasion
89
from art.attacks import extraction

0 commit comments

Comments
 (0)