thunlp/OpenBackdoor

Issue with launching StyleBkd

Xianwen-He opened this issue · 0 comments

Hi,

I was trying to launch StyleBkd using OpenBackdoor but always ended up with the following error report:

File "[CWD]/OpenBackdoor/openbackdoor/attackers/init.py", line 24, in load_attacker
return ATTACKERSconfig["name"].lower()
File "[CWD]/OpenBackdoor/openbackdoor/attackers/attacker.py", line 42, in init
self.poisoner = load_poisoner(poisoner)
File "[CWD]/OpenBackdoor/openbackdoor/attackers/poisoners/init.py", line 28, in load_poisoner
return POISONERSconfig["name"].lower()
File "[CWD]/OpenBackdoor/openbackdoor/attackers/poisoners/stylebkd_poisoner.py", line 31, in init
self.paraphraser = GPT2Generator(f"lievan/{style_chosen}", upper_length="same_5")
File "[CWD]/OpenBackdoor/openbackdoor/attackers/poisoners/utils/style/inference_utils.py", line 17, in init
self.args = torch.load("{}/training_args.bin".format(self.model_path))
File "[CWD]/anaconda3/lib/python3.9/site-packages/torch/serialization.py", line 699, in load
with _open_file_like(f, 'rb') as opened_file:
File "[CWD]/anaconda3/lib/python3.9/site-packages/torch/serialization.py", line 231, in _open_file_like
return _open_file(name_or_buffer, mode)
File "[CWD]/anaconda3/lib/python3.9/site-packages/torch/serialization.py", line 212, in init
super(_open_file, self).init(open(name, mode))
FileNotFoundError: [Errno 2] No such file or directory: 'lievan/bible/training_args.bin'

I was using demo_attack.py and specified the config to be style_config.json. This error was prompted when the main function tried to load the attacker, i.e., when the first line was executed. It seemed that some models/packages were missing, but I couldn't figure it out. I'd sincerely appreciate it if you have any idea about this problem.