QData / TextAttack

TextAttack 🐙 is a Python framework for adversarial attacks, data augmentation, and model training in NLP https://textattack.readthedocs.io/en/master/
https://textattack.readthedocs.io/en/master/
MIT License
2.98k stars 397 forks source link

Fix bug where EDA augmentation recipe would not accept default Augmentation arguments #797

Closed bterrific2008 closed 4 months ago

bterrific2008 commented 4 months ago

What does this PR do?

Summary

This PR resolves a bug where using the EDA augmentation recipe would not work with the textattack augmentation cli. This issue was because the EDA recipe did not accept the default arguments defined in the Augmentation superclass. This change resolves this issue by accepting a var-keyword parameter, which is then passed to the component Augmenter objects used by the EDA recipe.

This PR resolved the bug raised in #796, which found that running the EDA recipe from the textattack augmentation cli would raise a TypeError: __init__() got an unexpected keyword argument `high_yield`

Changes