-
Notifications
You must be signed in to change notification settings - Fork 10
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
WaNet probably broken with num_workers > 0
#19
Comments
I believe the One problem could be if control_grid is loaded, not sure how that would be handled across workers. What happens with validation loaders could also be a problem. |
Oops, that sounds right. The test still fails with multiple workers, but that's not a big deal (we can just run it with |
Took a look now and:
I think the best thing is just to add some tests and to see that everything works as it should. I'll (probably) do that sometime the coming days in-between other stuff. |
I think that part should be fine, we always create a single dataset and then pass that to the dataloaders. So I think the only issue would be with code that only gets called after the Seems pretty likely to me everything is actually fine and this was only specifically a problem for the test, so I'd be fine with removing the check and closing this. But if you still feel unsure, adding more tests sounds good. |
test_wanet
intest_pipeline.py
currently fails if we set use multiple workers: thecfg.train_data.backdoor
instance doesn't have its warping field initialized. My assumption is that this is because each worker ends up using its own copy of that, and the warping field is only initialized after making those copies (on the first__call__
). More importantly than failing this test case, I think that means the warping fields won't be shared across workers.I've added a check in
train_classifier.py
that raises an error in this setting, so not super high priority. But we should fix this, probably by initializing the warping field earlier.The text was updated successfully, but these errors were encountered: