thunlp / OpenBackdoor

An open-source toolkit for textual backdoor attack and defense (NeurIPS 2022 D&B, Spotlight)
https://openbackdoor.readthedocs.io/
Apache License 2.0
158 stars 23 forks source link

Errors in README.md #2

Closed acphile closed 2 years ago

acphile commented 2 years ago

Hi, Thank you for your nice work. I find the code in README.md is not correct. For load_dataset function (https://github.com/thunlp/OpenBackdoor/blame/main/README.md#L82)

poison_dataset = load_dataset({"name": "sst-2"}) 

I think it should be

poison_dataset = load_dataset(name="sst-2") 

And similarly for the rest cases in README.md

Beside, for Defender part in the demo,

victim = attacker.attack(victim, poison_dataset, defender)

However, the third argument position should be config, not defender

lifan-yuan commented 2 years ago

Thank you for pointing that out! We will correct these errors and double-check the docs :)