OpenAttack
OpenAttack copied to clipboard
An Open-Source Package for Textual Adversarial Attack.
>  这里应该改成swap?
is this URL "https://data.thunlp.org/" unavailable?
It seems like the official development and maintaining of OpenAttack have stalled. Here are some useful resources including personal implemented function for collecting generated adversarial examples, and backup of some...
for result in tqdm.tqdm(attack_eval.ieval(correct_samples), total=len(correct_samples)): this step is so slow! how can do this on GPU??
 Why this error occurred? and how to fix it
生成对抗用例
如果我只是想生成对抗用例,不需要对模型进行攻击和效果的评估,请问OpenAttack有提供相关的代码吗?
This avoid the user from getting an error from SSL. This change can be made for all the examples.
This will helps user from avoiding the SSL error.
For some reason, currently the `pip install openattack` doesn't fetch the latest version. When using in Google Colab, I integrate the latest version via this command `!pip install git+https://github.com/REPO` but...
`OpenAttack/metric/algorithms/modification.py` 的 `calc_score(self, tokenA : List[str], tokenB : List[str])` 函数中,当 tokenA 或者 tokenB 任意一个列表为空时,会触发ZeroDivisionError。 https://github.com/thunlp/OpenAttack/blob/4df712e0a5aebc03daa9b1ef353da4b7ea0a1b23/OpenAttack/metric/algorithms/modification.py#LL23C1-L43C29 ``` calc_score([1,1], [1,2]) -> 0.5 calc_score([], [1,2]) -> ZeroDivisionError calc_score([1,2], []) -> ZeroDivisionError calc_score([], [])...