Skip to content

Commit 8672a84

Browse files
authored
Merge branch 'dev_1.6.2' into development_issue_1062
2 parents bb07aaf + 91a7e73 commit 8672a84

File tree

3 files changed

+19
-13
lines changed

3 files changed

+19
-13
lines changed

.github/workflows/ci-style-checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
- name: Install Dependencies
3939
run: |
4040
python -m pip install --upgrade pip setuptools wheel
41-
pip install -q pylint==2.7.4 pycodestyle==2.7.0 black==20.8b1
41+
pip install -q pylint==2.7.4 mypy==0.812 pycodestyle==2.7.0 black==20.8b1
4242
pip install -q -r requirements.txt
4343
pip list
4444
- name: pycodestyle

art/evaluations/security_curve/security_curve.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
from typing import List, Optional, Tuple, TYPE_CHECKING, Union
2424

2525
import numpy as np
26-
from matplotlib import pyplot as plt
2726

2827
from art.evaluations.evaluation import Evaluation
2928
from art.attacks.evasion.projected_gradient_descent.projected_gradient_descent import ProjectedGradientDescent
@@ -162,6 +161,8 @@ def plot(self) -> None:
162161
Plot the Security Curve of adversarial accuracy as function opf attack budget `eps` together with the accuracy
163162
on benign samples.
164163
"""
164+
from matplotlib import pyplot as plt
165+
165166
plt.plot(self.eps_list, self.accuracy_adv_list, label="adversarial", marker="o")
166167
plt.plot([self.eps_list[0], self.eps_list[-1]], [self.accuracy, self.accuracy], linestyle="--", label="benign")
167168
plt.legend()

setup.py

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,10 @@
99
install_requires = [
1010
"numpy>=1.18.0",
1111
"scipy>=1.4.1",
12-
"matplotlib",
1312
"scikit-learn>=0.22.2,<0.24.3",
1413
"six",
1514
"setuptools",
16-
"Pillow",
1715
"tqdm",
18-
"statsmodels",
19-
"pydub",
20-
"resampy",
21-
"ffmpeg-python",
22-
"cma",
23-
"mypy",
2416
"numba~=0.53.1"
2517
]
2618

@@ -30,7 +22,7 @@
3022
"sphinx-autodoc-annotation",
3123
"sphinx-autodoc-typehints",
3224
"matplotlib",
33-
"numpy",
25+
"numpy>=1.18.0",
3426
"scipy>=1.4.1",
3527
"six>=1.13.0",
3628
"scikit-learn>=0.22.2,<0.24.3",
@@ -73,9 +65,13 @@ def get_version(rel_path):
7365
"lightgbm": ["lightgbm"],
7466
"mxnet": ["mxnet"],
7567
"tensorflow": ["tensorflow", "tensorflow_addons", "h5py"],
76-
"pytorch": ["torch", "torchvision", "torchaudio"],
68+
"tensorflow_image": ["tensorflow", "tensorflow_addons", "h5py", "Pillow", "ffmpeg-python", "opencv-python"],
69+
"tensorflow_audio": ["tensorflow", "tensorflow_addons", "h5py", "pydub", "resampy", "librosa"],
70+
"pytorch": ["torch", "torchvision"],
71+
"pytorch_image": ["torch", "torchvision", "kornia", "Pillow", "ffmpeg-python", "opencv-python"],
72+
"pytorch_audio": ["torch", "torchvision", "torchaudio", "pydub", "resampy", "librosa"],
7773
"xgboost": ["xgboost"],
78-
"lingvo_asr": ["tensorflow-gpu==2.1.0", "lingvo==0.6.4"],
74+
"lingvo_asr": ["tensorflow-gpu==2.1.0", "lingvo==0.6.4", "pydub", "resampy", "librosa"],
7975
"all": [
8076
"mxnet",
8177
"catboost",
@@ -88,6 +84,15 @@ def get_version(rel_path):
8884
"xgboost",
8985
"pandas",
9086
"kornia",
87+
"matplotlib",
88+
"Pillow",
89+
"statsmodels",
90+
"pydub",
91+
"resampy",
92+
"ffmpeg-python",
93+
"cma",
94+
"librosa",
95+
"opencv-python",
9196
],
9297
},
9398
classifiers=[

0 commit comments

Comments
 (0)