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

TypeError: 'NoneType' object does not support item assignment #7

Open
arm-on opened this issue Apr 17, 2024 · 0 comments
Open

TypeError: 'NoneType' object does not support item assignment #7

arm-on opened this issue Apr 17, 2024 · 0 comments

Comments

@arm-on
Copy link

arm-on commented Apr 17, 2024

Dear Hossein,
I was trying to reproduce the results of the paper. I ran the code on Kaggle:
https://www.kaggle.com/code/malekzadeharman/sleeper-agent-original-code/notebook
As you can see from the link above, I get the following error:
Traceback (most recent call last): File "/kaggle/working/Sleeper-Agent/sleeper_agent.py", line 47, in <module> poison_delta = witch.brew(model, data) File "/kaggle/working/Sleeper-Agent/forest/witchcoven/witch_base.py", line 49, in brew poison_delta = self._brew(victim, kettle) File "/kaggle/working/Sleeper-Agent/forest/witchcoven/witch_base.py", line 73, in _brew poison_delta, source_losses = self._run_trial(victim, kettle) File "/kaggle/working/Sleeper-Agent/forest/witchcoven/witch_base.py", line 187, in _run_trial loss, prediction = self._batched_step(poison_delta, poison_bounds, example, victim, kettle) File "/kaggle/working/Sleeper-Agent/forest/witchcoven/witch_base.py", line 338, in _batched_step poison_delta.grad[poison_slices] = delta_slice.grad.detach().to(device=torch.device('cpu')) TypeError: 'NoneType' object does not support item assignment

Could you please elaborate on this? What is the 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