Skip to content

Commit 0435b46

Browse files
committed
Merge remote-tracking branch 'origin/main' into dev_1.19.2
2 parents 38bdcbe + bb0d645 commit 0435b46

File tree

85 files changed

+71
-55
lines changed

Some content is hidden

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

85 files changed

+71
-55
lines changed

.github/actions/deepspeech-v3/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Get base image
2-
FROM python:3.10.13-slim-bullseye
2+
FROM python:3.10.13-slim-bookworm
33

44
# Set to install things in non-interactive mode
55
ENV DEBIAN_FRONTEND noninteractive

.github/actions/espresso/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Get base image
2-
FROM python:3.7.17-slim-bullseye
2+
FROM python:3.7.17-slim-bookworm
33

44
# Set to install things in non-interactive mode
55
ENV DEBIAN_FRONTEND noninteractive

.github/actions/goturn/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# Get base image
2-
FROM python:3.8.19-slim-bullseye
2+
FROM python:3.8.19-slim-bookworm
3+
4+
ENV MONO_TLS_PROVIDER=legacy
35

46
# Install system wide software
57
RUN apt-get update \

.github/actions/tfv2-faster-rcnn/Dockerfile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Get base from a tensorflow image
2-
FROM tensorflow/tensorflow:2.10.1
2+
FROM tensorflow/tensorflow:2.13.0
33

44
# Set to install things in non-interactive mode
55
ENV DEBIAN_FRONTEND noninteractive
@@ -38,10 +38,9 @@ RUN cd TensorFlow && wget https://github.com/protocolbuffers/protobuf/releases/d
3838
RUN cd TensorFlow && unzip protoc-3.17.3-linux-x86_64.zip -d protobuf
3939
RUN cd TensorFlow/models/research && /TensorFlow/protobuf/bin/protoc object_detection/protos/*.proto --python_out=.
4040
RUN cd TensorFlow/models/research && cp object_detection/packages/tf2/setup.py .
41-
RUN cd TensorFlow/models/research && python -m pip install --use-feature=2020-resolver .
41+
RUN cd TensorFlow/models/research && python -m pip install .
4242

4343
RUN pip install tqdm
4444
RUN pip install requests
45-
RUN pip install sklearn
4645
RUN pip install numba==0.50.0
4746
RUN pip install pytest-cov

.github/workflows/ci-deepspeech-v3.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
test_deepspeech_v3_torch_2_1_1:
2626
name: PyTorchDeepSpeech v3 / PyTorch 2.1.1
2727
runs-on: ubuntu-latest
28-
container: adversarialrobustnesstoolbox/art_testing_envs:deepspeech_v3_torch_2_1_1
28+
container: bbuesser/art_testing_env_deepspeech_v3_torch_2_1_1:latest
2929
steps:
3030
- name: Checkout Repo
3131
uses: actions/checkout@v4

.github/workflows/ci-espresso.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
test_espresso:
2626
name: PyTorchEspresso
2727
runs-on: ubuntu-latest
28-
container: adversarialrobustnesstoolbox/art_testing_envs:espresso
28+
container: bbuesser/art_testing_env_espresso:latest
2929
steps:
3030
- name: Checkout Repo
3131
uses: actions/checkout@v4

.github/workflows/ci-goturn.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
test_pytorch_goturn:
2626
name: PyTorchGoturn
2727
runs-on: ubuntu-latest
28-
container: adversarialrobustnesstoolbox/art_testing_envs:goturn
28+
container: bbuesser/art_testing_env_goturn:latest
2929
steps:
3030
- name: Checkout Repo
3131
uses: actions/checkout@v4

.github/workflows/ci-legacy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ jobs:
2929
matrix:
3030
module: [attacks_1, attacks_2, estimators, defences, metrics, art]
3131
include:
32-
- name: legacy (TensorFlow 2.14.0 Keras 2.14.0 PyTorch 1.13.1 scikit-learn 1.1.3 Python 3.9)
32+
- name: legacy (TensorFlow 2.14.0 Keras 2.14.0 PyTorch 1.13.1 scikit-learn 1.6.1 Python 3.9)
3333
framework: legacy
3434
python: '3.10'
3535
tensorflow: 2.14.0
3636
keras: 2.14.0
3737
torch: 1.13.1+cpu
3838
torchvision: 0.14.1+cpu
3939
torchaudio: 0.13.1+cpu
40-
scikit-learn: 1.1.3
40+
scikit-learn: 1.6.1
4141

4242
name: Run ${{ matrix.module }} ${{ matrix.name }} Tests
4343
steps:

.github/workflows/ci-scikit-learn.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@ jobs:
2828
fail-fast: false
2929
matrix:
3030
include:
31-
- name: scikit-learn 1.3.2 (Python 3.10)
31+
- name: scikit-learn 1.5.2 (Python 3.10)
3232
framework: scikitlearn
33-
scikit-learn: 1.3.2
33+
scikit-learn: 1.5.2
3434
python: '3.10'
35-
- name: scikit-learn 1.4.0 (Python 3.10)
35+
- name: scikit-learn 1.6.1 (Python 3.10)
3636
framework: scikitlearn
37-
scikit-learn: 1.4.0
37+
scikit-learn: 1.6.1
3838
python: '3.10'
3939

4040
name: ${{ matrix.name }}
@@ -50,7 +50,7 @@ jobs:
5050
sudo apt-get update
5151
sudo apt-get -y -q install ffmpeg libavcodec-extra
5252
python -m pip install --upgrade pip setuptools wheel
53-
pip install -r requirements_test.txt
53+
pip install -q -r <(sed '/^scikit-learn/d' requirements_test.txt)
5454
pip install scikit-learn==${{ matrix.scikit-learn }}
5555
pip list
5656
- name: Run Tests

.github/workflows/ci-tfv2-faster-rcnn.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
test_tf_v2_faster_rcnn:
2626
name: TensorFlowV2FasterRCNN
2727
runs-on: ubuntu-latest
28-
container: adversarialrobustnesstoolbox/art_testing_envs:tfv2-faster-rcnn
28+
container: bbuesser/art_testing_env_tfv2-faster-rcnn:latest
2929
steps:
3030
- name: Checkout Repo
3131
uses: actions/checkout@v4

requirements_test.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
numpy>=1.18.5,<1.27
66
scipy==1.10.1
77
matplotlib==3.7.1
8-
scikit-learn==1.4.1.post1
8+
scikit-learn==1.6.1
99
six==1.17.0
1010
Pillow==11.1.0
1111
tqdm==4.67.1

tests/attacks/inference/attribute_inference/test_baseline.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ def transform_feature(x):
7878
baseline_inferred_test
7979
)
8080

81-
expected_train_acc = {"nn": 0.58, "rf": 0.98, "gb": 0.98, "lr": 0.77, "dt": 0.98, "knn": 0.86, "svm": 0.83}
82-
expected_test_acc = {"nn": 0.62, "rf": 0.86, "gb": 0.82, "lr": 0.86, "dt": 0.84, "knn": 0.82, "svm": 0.93}
81+
expected_train_acc = {"nn": 0.58, "rf": 0.98, "gb": 0.98, "lr": 0.77, "dt": 0.98, "knn": 0.84, "svm": 0.83}
82+
expected_test_acc = {"nn": 0.62, "rf": 0.83, "gb": 0.79, "lr": 0.86, "dt": 0.82, "knn": 0.82, "svm": 0.93}
8383

8484
assert expected_train_acc[model_type] <= baseline_train_acc
8585
assert expected_test_acc[model_type] <= baseline_test_acc
@@ -176,7 +176,7 @@ def transform_feature(x):
176176
)
177177

178178
expected_train_acc = {"nn": 0.58, "rf": 0.98, "gb": 0.98, "lr": 0.77, "dt": 0.98, "knn": 0.85, "svm": 0.83}
179-
expected_test_acc = {"nn": 0.62, "rf": 0.86, "gb": 0.82, "lr": 0.86, "dt": 0.8, "knn": 0.81, "svm": 0.93}
179+
expected_test_acc = {"nn": 0.62, "rf": 0.83, "gb": 0.82, "lr": 0.86, "dt": 0.8, "knn": 0.81, "svm": 0.93}
180180

181181
assert expected_train_acc[model_type] <= baseline_train_acc
182182
assert expected_test_acc[model_type] <= baseline_test_acc
@@ -228,7 +228,7 @@ def transform_feature(x):
228228
)
229229

230230
expected_train_acc = {"nn": 0.58, "rf": 0.98, "gb": 0.98, "lr": 0.77, "dt": 0.98, "knn": 0.85, "svm": 0.83}
231-
expected_test_acc = {"nn": 0.62, "rf": 0.88, "gb": 0.82, "lr": 0.86, "dt": 0.8, "knn": 0.81, "svm": 0.93}
231+
expected_test_acc = {"nn": 0.62, "rf": 0.82, "gb": 0.8, "lr": 0.86, "dt": 0.8, "knn": 0.81, "svm": 0.93}
232232

233233
assert expected_train_acc[model_type] <= baseline_train_acc
234234
assert expected_test_acc[model_type] <= baseline_test_acc
@@ -510,7 +510,7 @@ def transform_other_feature(x):
510510
)
511511

512512
expected_train_acc = {"nn": 0.58, "rf": 0.94, "gb": 0.95, "lr": 0.8, "dt": 0.94, "knn": 0.87, "svm": 0.8}
513-
expected_test_acc = {"nn": 0.62, "rf": 0.84, "gb": 0.84, "lr": 0.86, "dt": 0.82, "knn": 0.86, "svm": 0.88}
513+
expected_test_acc = {"nn": 0.62, "rf": 0.82, "gb": 0.84, "lr": 0.86, "dt": 0.79, "knn": 0.86, "svm": 0.88}
514514

515515
assert expected_train_acc[model_type] <= baseline_train_acc
516516
assert expected_test_acc[model_type] <= baseline_test_acc

tests/estimators/classification/test_scikitlearn.py

Lines changed: 41 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ def test_type(self):
149149

150150
def test_predict(self):
151151
y_predicted = self.classifier.predict(self.x_test_iris[0:1])
152-
y_expected = np.asarray([[3.07686594e-16, 2.23540978e-02, 9.77645902e-01]])
152+
y_expected = np.asarray([[0.25544427, 0.35099888, 0.39355685]])
153153
np.testing.assert_array_almost_equal(y_predicted, y_expected, decimal=4)
154154

155155
def test_save(self):
@@ -298,9 +298,9 @@ def test_class_gradient_none_1(self):
298298
grad_predicted = self.classifier.class_gradient(self.x_test_iris[0:1], label=None)
299299
grad_expected = [
300300
[
301-
[-1.98021257, 1.35627806, -6.28222561, -2.60076308],
302-
[-0.56322294, -0.70427608, -0.98874801, -0.67053026],
303-
[0.6508137, 0.26377308, 1.54522324, 0.80972391],
301+
[-1.97804999, 1.35988402, -6.28209543, -2.59983373],
302+
[-0.56164223, -0.70078993, -0.98865014, -0.66950917],
303+
[0.64962, 0.2610305, 1.54549754, 0.80910802],
304304
]
305305
]
306306
np.testing.assert_array_almost_equal(grad_predicted, grad_expected, decimal=3)
@@ -309,45 +309,60 @@ def test_class_gradient_none_2(self):
309309
grad_predicted = self.classifier.class_gradient(self.x_test_iris[0:2], label=None)
310310
grad_expected = [
311311
[
312-
[-1.98021257, 1.35627806, -6.28222561, -2.60076308],
313-
[-0.56322294, -0.70427608, -0.98874801, -0.67053026],
314-
[0.6508137, 0.26377308, 1.54522324, 0.80972391],
312+
[
313+
-1.97804999,
314+
1.35988402,
315+
-6.28209543,
316+
-2.59983397,
317+
],
318+
[
319+
-0.56164235,
320+
-0.70078993,
321+
-0.98865038,
322+
-0.66950929,
323+
],
324+
[
325+
0.64961988,
326+
0.26103044,
327+
1.5454973,
328+
0.8091079,
329+
],
315330
],
316331
[
317-
[-1.92227495, 1.34355378, -6.11815596, -2.52638054],
318-
[-0.50528532, -0.71700042, -0.82467848, -0.59614766],
319-
[0.70875132, 0.25104877, 1.70929277, 0.88410652],
332+
[-1.9202075, 1.34698176, -6.1180439, -2.5255065],
333+
[-0.50379974, -0.71369207, -0.82459873, -0.59518182],
334+
[0.70746249, 0.24812828, 1.70954895, 0.88343531],
320335
],
321336
]
322337
np.testing.assert_array_almost_equal(grad_predicted, grad_expected, decimal=3)
323338

324339
def test_class_gradient_int_1(self):
325340
grad_predicted = self.classifier.class_gradient(self.x_test_iris[0:1], label=1)
326-
grad_expected = [[[-0.56317311, -0.70493763, -0.98908609, -0.67106276]]]
341+
grad_expected = [[[-0.56164223, -0.70078993, -0.98865014, -0.66950917]]]
327342

328343
for i_shape in range(4):
329344
self.assertAlmostEqual(grad_predicted[0, 0, i_shape], grad_expected[0][0][i_shape], 3)
330345

331346
def test_class_gradient_int_2(self):
332347
grad_predicted = self.classifier.class_gradient(self.x_test_iris[0:2], label=1)
333348
grad_expected = [
334-
[[-0.56317306, -0.70493776, -0.98908573, -0.67106259]],
335-
[[-0.50522697, -0.71762568, -0.82497531, -0.5966416]],
349+
[[-0.56164235, -0.70078993, -0.98865038, -0.66950929]],
350+
[[-0.50379974, -0.71369207, -0.82459873, -0.59518182]],
336351
]
337352
np.testing.assert_array_almost_equal(grad_predicted, grad_expected, decimal=4)
338353

339354
def test_class_gradient_list_1(self):
340355
grad_predicted = self.classifier.class_gradient(self.x_test_iris[0:1], label=[1])
341-
grad_expected = [[[-0.56317311, -0.70493763, -0.98874801, -0.67106276]]]
356+
grad_expected = [[[-0.56164223, -0.70078993, -0.98865014, -0.66950917]]]
342357

343358
for i_shape in range(4):
344359
self.assertAlmostEqual(grad_predicted[0, 0, i_shape], grad_expected[0][0][i_shape], 3)
345360

346361
def test_class_gradient_list_2(self):
347362
grad_predicted = self.classifier.class_gradient(self.x_test_iris[0:2], label=[1, 2])
348363
grad_expected = [
349-
[[-0.56317306, -0.70493776, -0.98908573, -0.67106259]],
350-
[[0.70866591, 0.25158876, 1.70947325, 0.88450021]],
364+
[[-0.56164235, -0.70078993, -0.98865038, -0.66950929]],
365+
[[0.70746249, 0.24812828, 1.70954895, 0.88343531]],
351366
]
352367
np.testing.assert_array_almost_equal(grad_predicted, grad_expected, decimal=3)
353368

@@ -362,7 +377,7 @@ def test_class_gradient_label_wrong_type(self):
362377

363378
def test_loss_gradient(self):
364379
grad_predicted = self.classifier.loss_gradient(self.x_test_iris[0:1], self.y_test_iris[0:1])
365-
grad_expected = np.asarray([[-0.21690657, -0.08809226, -0.51512082, -0.27002635]])
380+
grad_expected = np.asarray([[-0.21654, -0.08701016, -0.51516586, -0.26970267]])
366381
np.testing.assert_array_almost_equal(grad_predicted, grad_expected, decimal=4)
367382

368383
def test_save(self):
@@ -541,36 +556,36 @@ def test_class_gradient_none(self):
541556
grad_predicted = self.classifier.class_gradient(self.x_test_iris[0:1], label=None)
542557
grad_expected = [
543558
[
544-
[-0.34648966, 1.63777444, -3.51845999, -1.4609451],
545-
[-0.11198028, -2.51565392, 0.71538245, -0.44830889],
546-
[-0.38021886, -0.57562105, 3.59966607, 2.31772514],
559+
[-0.34659522, 1.6376213, -3.51851979, -1.46078468],
560+
[-0.1121541, -2.51552211, 0.71569165, -0.44883585],
561+
[-0.380205, -0.57552204, 3.59972012, 2.31760663],
547562
]
548563
]
549564
np.testing.assert_array_almost_equal(grad_predicted, grad_expected, decimal=4)
550565

551566
def test_class_gradient_int_1(self):
552567
grad_predicted = self.classifier.class_gradient(self.x_test_iris[0:1], label=1)
553-
grad_expected = [[[-0.11198028, -2.51565392, 0.71538245, -0.44830889]]]
568+
grad_expected = [[[-0.1121541, -2.51552211, 0.71569165, -0.44883585]]]
554569
np.testing.assert_array_almost_equal(grad_predicted, grad_expected, decimal=4)
555570

556571
def test_class_gradient_int_2(self):
557572
grad_predicted = self.classifier.class_gradient(self.x_test_iris[0:2], label=1)
558573
grad_expected = [
559-
[[-0.11198028, -2.51565392, 0.71538245, -0.44830889]],
560-
[[-0.11198028, -2.51565392, 0.71538245, -0.44830889]],
574+
[[-0.1121541, -2.51552211, 0.71569165, -0.44883585]],
575+
[[-0.1121541, -2.51552211, 0.71569165, -0.44883585]],
561576
]
562577
np.testing.assert_array_almost_equal(grad_predicted, grad_expected, decimal=4)
563578

564579
def test_class_gradient_list_1(self):
565580
grad_predicted = self.classifier.class_gradient(self.x_test_iris[0:1], label=[1])
566-
grad_expected = [[[-0.11198028, -2.51565392, 0.71538245, -0.44830889]]]
581+
grad_expected = [[[-0.1121541, -2.51552211, 0.71569165, -0.44883585]]]
567582
np.testing.assert_array_almost_equal(grad_predicted, grad_expected, decimal=4)
568583

569584
def test_class_gradient_list_2(self):
570585
grad_predicted = self.classifier.class_gradient(self.x_test_iris[0:2], label=[1, 2])
571586
grad_expected = [
572-
[[-0.11198028, -2.51565392, 0.71538245, -0.44830889]],
573-
[[-0.38021886, -0.57562105, 3.59966607, 2.31772514]],
587+
[[-0.1121541, -2.51552211, 0.71569165, -0.44883585]],
588+
[[-0.380205, -0.57552204, 3.59972012, 2.31760663]],
574589
]
575590
np.testing.assert_array_almost_equal(grad_predicted, grad_expected, decimal=4)
576591

tests/utils.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1748,10 +1748,10 @@ def get_tabular_classifier_scikit_list(clipped=False, model_list_names=None):
17481748
)
17491749

17501750
sklearn_version = list(map(int, sklearn.__version__.split(".")))
1751-
if sklearn_version[0] == 1 and sklearn_version[1] == 3:
1752-
suffix = "-eq-1.3.0"
1753-
elif sklearn_version[0] == 1 and sklearn_version[1] == 4:
1754-
suffix = "-eq-1.4.0"
1751+
if sklearn_version[0] == 1 and sklearn_version[1] == 5:
1752+
suffix = "-eq-1.5.2"
1753+
elif sklearn_version[0] == 1 and sklearn_version[1] == 6:
1754+
suffix = "-eq-1.6.1"
17551755
else:
17561756
suffix = ""
17571757

utils/resources/create_model_weights.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ def create_scikit_model_weights():
154154
os.path.join(
155155
os.path.dirname(os.path.dirname(__file__)),
156156
"resources/models/scikit/",
157-
"scikit-" + model_name + "-iris-clipped-eq-1.4.0.pickle",
157+
"scikit-" + model_name + "-iris-clipped-eq-1.6.1.pickle",
158158
),
159159
"wb",
160160
),
@@ -168,7 +168,7 @@ def create_scikit_model_weights():
168168
os.path.join(
169169
os.path.dirname(os.path.dirname(__file__)),
170170
"resources/models/scikit/",
171-
"scikit-" + model_name + "-iris-unclipped-eq-1.4.0.pickle",
171+
"scikit-" + model_name + "-iris-unclipped-eq-1.6.1.pickle",
172172
),
173173
"wb",
174174
),
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)