Skip to content
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

AutoAttack skips attacks not supporting targeted mode [JATIC-I2-IBM] #2257

Merged
merged 8 commits into from
Sep 14, 2023

Conversation

kieranfraser
Copy link
Collaborator

@kieranfraser kieranfraser commented Aug 24, 2023

Description

  • Adding provision to attack.py so that attempted modification of a non-supported attack parameter raises a ValueError.
  • Adding try/except to AutoAttack so that attacks which do not support targeted mode are skipped.

Fixes #2256

Type of change

Please check all relevant options.

  • Improvement (non-breaking)
  • Bug fix (non-breaking)
  • New feature (non-breaking)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Testing

Please describe the tests that you ran to verify your changes. Consider listing any relevant details of your test configuration.

  • tests/attacks/evasion/test_auto_attack.py - test_attack_if_targeted_not_supported tests that attacks which do not support targeted raise a ValueError (which is caught by auto_attack).

Test Configuration:

  • OS: macOS
  • Python version: 3.10
  • ART version or commit number: dev_1.16.0

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

…ted mode

Signed-off-by: Kieran Fraser <Kieran.Fraser@ibm.com>
@codecov-commenter
Copy link

codecov-commenter commented Aug 24, 2023

Codecov Report

Merging #2257 (cd8ffe3) into dev_1.16.0 (ee1fda8) will not change coverage.
The diff coverage is n/a.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Impacted file tree graph

@@             Coverage Diff             @@
##           dev_1.16.0    #2257   +/-   ##
===========================================
  Coverage       85.80%   85.80%           
===========================================
  Files             318      318           
  Lines           28365    28365           
  Branches         5173     5173           
===========================================
  Hits            24338    24338           
  Misses           2718     2718           
  Partials         1309     1309           

@beat-buesser beat-buesser self-requested a review August 25, 2023 09:25
@beat-buesser beat-buesser self-assigned this Aug 25, 2023
@beat-buesser beat-buesser added bug Something isn't working improvement Improve implementation labels Aug 25, 2023
@beat-buesser beat-buesser added this to the ART 1.16.0 milestone Aug 25, 2023
@beat-buesser beat-buesser changed the base branch from dev_1.16.0 to dev_1.15.2 September 4, 2023 08:41
@beat-buesser beat-buesser changed the base branch from dev_1.15.2 to dev_1.16.0 September 4, 2023 08:41
@kieranfraser kieranfraser changed the title AutoAttack skips attacks not supporting targeted mode AutoAttack skips attacks not supporting targeted mode [JATIC-I2-IBM] Sep 4, 2023
Signed-off-by: Kieran Fraser <Kieran.Fraser@ibm.com>
@beat-buesser beat-buesser marked this pull request as ready for review September 7, 2023 15:31
@beat-buesser beat-buesser marked this pull request as draft September 7, 2023 15:32
@kieranfraser kieranfraser marked this pull request as ready for review September 8, 2023 13:52
@beat-buesser beat-buesser linked an issue Sep 12, 2023 that may be closed by this pull request
Copy link
Collaborator

@beat-buesser beat-buesser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @kieranfraser Thank you very much for finding and fixing this bug!

kieranfraser and others added 2 commits September 13, 2023 19:15
Signed-off-by: Kieran Fraser <Kieran.Fraser@ibm.com>
@beat-buesser beat-buesser merged commit caf5ecc into Trusted-AI:dev_1.16.0 Sep 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working improvement Improve implementation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

AutoAttack runs targeted attacks when not supported
3 participants