-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Set weights_only=True as a default when loading snapshot weights.
#2818
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
Conversation
|
this seems to break this fucntion now @n-poulsen output (on weights that worked yesterday!) and if I edit the pytorch config, adding |
|
@n-poulsen I can confirm if I roll back to this commit, it's working, so I think its this PR that is causing issues cc @maximpavliv !pip install --force-reinstall "git+https://github.com/DeepLabCut/DeepLabCut.git@198fc74#egg=deeplabcut[modelzoo]" |
|
@MMathisLab Sorry about that - I should have made the error message more clear. This might happen on weights that were previously trained in DeepLabCut. The issue is with If we don't want users who already have trained weights to have these issues, we could:
Do you see one of those two options as a good way to deal with this issue? I was able to successfully load such weights by adding the ...
detector:
runner:
load_weights_only: false
...
runner:
load_weights_only: false |
Addresses #2725. The
torch.loadmethod is now called withweights_only=Trueas a default. If loading snapshot weights fails, users can set aload_weights_only: Falsekey in theirpytorch_config.yamlfile to set theweights_onlyparameter to False. This is explained in the error message when loading weights fails. This should only be done when users trust the content of the snapshot they're loading, as explained in thetorch.loaddocs.Tests were added to ensure
torch.loadwas called with the correct parameters.To set
weights_only=False, users can edit theirpytorch_config.yamlfiles as: