Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with launching StyleBkd #30

Open
Xianwen-He opened this issue Mar 21, 2024 · 0 comments
Open

Issue with launching StyleBkd #30

Xianwen-He opened this issue Mar 21, 2024 · 0 comments

Comments

@Xianwen-He
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant