[Draft] Add adversarial defense benchmark
What does this PR do?
Introduce an interface of adversarial defense to benchmark adversarial defense methods.
Summary
The test examples is available in https://github.com/yangheng95/TextAttack/blob/master/examples/reactive_defense/sst2_reactive_defense.py Please contact me and help test if you are interested in this PR. @jxmorris12
This PR is related to https://github.com/QData/TextAttack/issues/687
Additions
- [1] https://github.com/yangheng95/TextAttack/blob/master/textattack/models/wrappers/pyabsa_model_wrapper.py
- [2] https://github.com/yangheng95/TextAttack/tree/master/textattack/reactive_defense
Changes
- [1] Add **kwargs for many functions, see the source code.
- [2] Modify the search_method()
Deletions
-
Example: Remove unnecessary files under
textattack.models...
Checklist
- [x] The title of your pull request should be a summary of its contribution.
- [x] Please write detailed description of what parts have been newly added and what parts have been modified. Please also explain why certain changes were made.
- [x] If your pull request addresses an issue, please mention the issue number in the pull request description to make sure they are linked (and people consulting the issue know you are working on it)
- [x] To indicate a work in progress please mark it as a draft on Github.
- [x] Make sure existing tests pass.
- [x] Add relevant tests. No quality testing = no merge.
- [x] All public methods must have informative docstrings that work nicely with sphinx. For new modules/files, please add/modify the appropriate
.rstfile inTextAttack/docs/apidoc.'
Check out this pull request on ![]()
See visual diffs & provide feedback on Jupyter Notebooks.
Powered by ReviewNB
Hi there, @jxmorris12 Do you have any questions about this PR?
Hi @jxmorris12, this PR has been tested in my own environment.
@yangheng95 mind to add some unit tests / also please solve conflicts / and locally run "make test"
@yangheng95 do you mind to also add a Jupyter notebook under doc/2notebook to give good examples of your newly added features? Thanks..
@yangheng95 do you mind to also add a Jupyter notebook under doc/2notebook to give good examples of your newly added features? Thanks..
Hi, that is ok. And I will push a PR recently, to show some examples and provide detailed documents.
Closing as it's been over a year. Please feel free to reopen once you've resolved conflicts with the current version of TextAttack and improved the documentation + testing!