Skip to content

Commit f9600a4

Browse files
committed
Merge remote-tracking branch 'origin' into dev_1.20.0
2 parents 9266f01 + af90a12 commit f9600a4

File tree

4 files changed

+15
-8
lines changed

4 files changed

+15
-8
lines changed

art/evaluations/security_curve/security_curve.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,12 @@ def plot(self) -> None: # pragma: no cover
165165
from matplotlib import pyplot as plt
166166

167167
plt.plot(self.eps_list, self.accuracy_adv_list, label="adversarial", marker="o")
168-
plt.plot([self.eps_list[0], self.eps_list[-1]], [self.accuracy, self.accuracy], linestyle="--", label="benign")
168+
plt.plot(
169+
[self.eps_list[0], self.eps_list[-1]], # type: ignore
170+
[self.accuracy, self.accuracy], # type: ignore
171+
linestyle="--",
172+
label="benign",
173+
)
169174
plt.legend()
170175
plt.xlabel("Attack budget eps")
171176
plt.ylabel("Accuracy")

art/visualization.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def plot_3d(
150150
for i, coord in enumerate(points):
151151
try:
152152
color_point = labels[i]
153-
axis.scatter3D(coord[0], coord[1], coord[2], color=colors[color_point])
153+
axis.scatter3D(coord[0], coord[1], coord[2], color=colors[color_point]) # type: ignore
154154
except IndexError:
155155
raise ValueError(
156156
"Labels outside the range. Should start from zero and be sequential there after"

requirements_test.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
numpy>=1.18.5,<1.27
66
scipy==1.10.1
7-
matplotlib==3.7.1
7+
matplotlib==3.9.4
88
scikit-learn==1.6.1
99
six==1.17.0
1010
Pillow==11.1.0
@@ -44,19 +44,19 @@ xgboost==2.1.1
4444
kornia~=0.8.0
4545
tensorboardX==2.6.2.2
4646
lief==0.15.1
47-
jax[cpu]==0.4.26
47+
jax[cpu]==0.4.30
4848

4949
# tests and style checking
5050
pytest~=8.3.2
5151
pytest-mock~=3.14.0
52-
pytest-cov~=6.0.0
52+
pytest-cov~=6.1.1
5353
pylint==3.2.6
5454
mypy==1.11.1
5555
pycodestyle==2.12.1
5656
black==25.1.0
5757
ruff==0.9.3
58-
types-six==1.16.21.9
59-
types-PyYAML==6.0.12.20240917
58+
types-six==1.17.0.20250515
59+
types-PyYAML==6.0.12.20250516
6060
types-setuptools==80.9.0.20250529
6161

6262
# other

tests/attacks/test_steal_now_attack_later.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,8 @@ def collect_patches_from_images(detector, imgs):
6666
pos_matrix[:, 2] = torch.clamp_max(pos_matrix[:, 2], imgs.shape[3])
6767
pos_matrix[:, 3] = torch.clamp_max(pos_matrix[:, 3], imgs.shape[2])
6868
for pos_m in pos_matrix:
69+
if pos_m[3] - pos_m[1] == 0 or pos_m[2] - pos_m[0] == 0:
70+
continue
6971
p = imgs[i, :, pos_m[1] : pos_m[3], pos_m[0] : pos_m[2]]
7072
patch.append(p.to(detector.device))
7173

@@ -165,7 +167,7 @@ def _loader(path):
165167
attack = SNAL(
166168
object_detector,
167169
eps=16.0 / 255.0,
168-
max_iter=10,
170+
max_iter=5,
169171
num_grid=10,
170172
candidates=candidates_list,
171173
collector=collect_patches_from_images,

0 commit comments

Comments
 (0)