-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove incorrectly duplicated queries in SignOPT attack #2129
Remove incorrectly duplicated queries in SignOPT attack #2129
Conversation
Bumps [pillow](https://github.com/python-pillow/Pillow) from 9.4.0 to 9.5.0. - [Release notes](https://github.com/python-pillow/Pillow/releases) - [Changelog](https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst) - [Commits](python-pillow/Pillow@9.4.0...9.5.0) --- updated-dependencies: - dependency-name: pillow dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
…low-9.5.0 Bump pillow from 9.4.0 to 9.5.0
Signed-off-by: Yue Gao <11145354+Lodour@users.noreply.github.com>
3ac8b92
to
4a9ef03
Compare
Hi @Lodour Thank you very much for your pull request! We'll review it as soon as possible. |
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## dev_1.15.0 #2129 +/- ##
==============================================
- Coverage 85.63% 85.61% -0.03%
==============================================
Files 297 297
Lines 26521 26521
Branches 4864 4864
==============================================
- Hits 22712 22706 -6
- Misses 2571 2576 +5
- Partials 1238 1239 +1
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Lodour Thank you very much for your pull request! The improvements look good to me.
Description
The current implementation of SignOPT sends duplicated queries when checking targeted/untargeted modes. This is because the model query happens before the mode checking. For example:
adversarial-robustness-toolbox/art/attacks/evasion/sign_opt.py
Lines 309 to 311 in 22dbf83
In untargeted mode,
self.targeted = False
would cost an unnecessaryself._is_label
call.This PR moves the mode checks ahead of the
self._is_label
as a valid short-circuiting.It is hard to determine the exact number of calls wasted due to this problem, but this PR should reduce half of the running time for this specific part.
Type of change
Please check all relevant options.
Testing
Please describe the tests that you ran to verify your changes. Consider listing any relevant details of your test configuration.
Test Configuration:
Checklist