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

Implement support for deepspeech v3 in ASR attack and Deepspeech estimator #1107

Merged
merged 25 commits into from May 14, 2021

Conversation

minhitbk
Copy link
Collaborator

@minhitbk minhitbk commented May 13, 2021

Description

This PR implements support for Deepspeech V3 in ASR attack and the estimator. In addition, the Deepspeech V3 testing environment is also created.

Fixes #911
Fixes #1033

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.

  • Test A
  • Test B

Test Configuration:

  • OS
  • Python version
  • ART version or commit number
  • TensorFlow / Keras / PyTorch / MXNet version

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

Signed-off-by: Ngoc Minh Tran <M.N.Tran@ibm.com>
Signed-off-by: Ngoc Minh Tran <M.N.Tran@ibm.com>
Signed-off-by: Ngoc Minh Tran <M.N.Tran@ibm.com>
Signed-off-by: Ngoc Minh Tran <M.N.Tran@ibm.com>
Signed-off-by: Ngoc Minh Tran <M.N.Tran@ibm.com>
Signed-off-by: Ngoc Minh Tran <M.N.Tran@ibm.com>
Signed-off-by: Ngoc Minh Tran <M.N.Tran@ibm.com>
Signed-off-by: Ngoc Minh Tran <M.N.Tran@ibm.com>
Signed-off-by: Ngoc Minh Tran <M.N.Tran@ibm.com>
Signed-off-by: Ngoc Minh Tran <M.N.Tran@ibm.com>
Signed-off-by: Ngoc Minh Tran <M.N.Tran@ibm.com>
Signed-off-by: Ngoc Minh Tran <M.N.Tran@ibm.com>
Signed-off-by: Ngoc Minh Tran <M.N.Tran@ibm.com>
Signed-off-by: Ngoc Minh Tran <M.N.Tran@ibm.com>
Signed-off-by: Ngoc Minh Tran <M.N.Tran@ibm.com>
Signed-off-by: Ngoc Minh Tran <M.N.Tran@ibm.com>
Signed-off-by: Ngoc Minh Tran <M.N.Tran@ibm.com>
Signed-off-by: Ngoc Minh Tran <M.N.Tran@ibm.com>
Signed-off-by: Ngoc Minh Tran <M.N.Tran@ibm.com>
Signed-off-by: Ngoc Minh Tran <M.N.Tran@ibm.com>
@minhitbk minhitbk added enhancement New feature or request tests Updates for Tests labels May 13, 2021
@codecov-commenter
Copy link

codecov-commenter commented May 13, 2021

Codecov Report

Merging #1107 (10ed294) into dev_1.7.0 (2a402cd) will decrease coverage by 23.27%.
The diff coverage is 65.62%.

Impacted file tree graph

@@              Coverage Diff               @@
##           dev_1.7.0    #1107       +/-   ##
==============================================
- Coverage      64.45%   41.18%   -23.28%     
==============================================
  Files            221      221               
  Lines          19295    19328       +33     
  Branches        3533     3549       +16     
==============================================
- Hits           12437     7960     -4477     
- Misses          5438    10407     +4969     
+ Partials        1420      961      -459     
Impacted Files Coverage Δ
...timators/speech_recognition/pytorch_deep_speech.py 72.75% <65.62%> (-1.08%) ⬇️
...rt/defences/detector/poison/clustering_analyzer.py 8.22% <0.00%> (-86.71%) ⬇️
...ces/detector/evasion/subsetscanning/scanningops.py 11.59% <0.00%> (-85.51%) ⬇️
art/attacks/evasion/carlini.py 8.40% <0.00%> (-80.87%) ⬇️
...ient_descent/projected_gradient_descent_pytorch.py 16.27% <0.00%> (-76.75%) ⬇️
art/metrics/verification_decisions_trees.py 13.68% <0.00%> (-73.16%) ⬇️
art/attacks/evasion/decision_tree_attack.py 22.66% <0.00%> (-69.34%) ⬇️
art/attacks/evasion/adversarial_patch/utils.py 11.53% <0.00%> (-69.24%) ⬇️
art/attacks/evasion/elastic_net.py 17.41% <0.00%> (-69.04%) ⬇️
art/defences/detector/poison/activation_defence.py 15.71% <0.00%> (-68.90%) ⬇️
... and 78 more

@beat-buesser beat-buesser self-assigned this May 13, 2021
@beat-buesser beat-buesser removed the tests Updates for Tests label May 13, 2021
@beat-buesser beat-buesser added this to Pull request open in ART 1.7.0 via automation May 13, 2021
@beat-buesser beat-buesser added this to the ART 1.7.0 milestone May 13, 2021
@beat-buesser beat-buesser added the tests Updates for Tests label May 13, 2021
scikit-image

# Install necessary libraries for deepspeech v3
RUN pip install torch
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should we define a version for torch since we define an older version for torchaudio?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

No, this is already defined with the base image.


# Install necessary libraries for deepspeech v3
RUN pip install torch
RUN pip install tensorflow
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is tensorflow required in this test image for PyTorch models?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, for some "import" in the conftest.py file which is not created by this PR, without tensorflow, error occurs.

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 @minhitbk Thank you very much for adding support for DeepSpeech v3!

I have proposed a few small changes to account for recent CI updates and a few questions, what do you think?

ART 1.7.0 automation moved this from Pull request open to Pull request review May 14, 2021
Co-authored-by: Beat Buesser <49047826+beat-buesser@users.noreply.github.com>
@beat-buesser beat-buesser merged commit 8f21795 into dev_1.7.0 May 14, 2021
ART 1.7.0 automation moved this from Pull request review to Pull request done May 14, 2021
@beat-buesser beat-buesser deleted the deepspeech_v3 branch May 14, 2021 19:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request tests Updates for Tests
Projects
No open projects
ART 1.7.0
  
Pull request done
3 participants