This repository was archived by the owner on Aug 7, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 887
Use weights_only for load #3073
Open
kit1980
wants to merge
4
commits into
master
Choose a base branch
from
sdym/weights-only
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The actual changes are in the first commit. |
CI should pass..not sure why it was failing.. Hopefully works this time |
@msaroufim This needs some debugging. Its failing everytime |
@agunapal that's fine I think this is important to look at regardless |
Seems like weights_only is not working in this test:
Will take a look later |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
torch.load
withoutweights_only
parameter is unsafe. Explicitly setweights_only
to False only if you trust the data you load and full pickle functionality is needed, otherwise setweights_only=True
.If
weights_only=True
doesn't work for some cases, then explicitweights_only=False
should be used.Found with https://github.com/pytorch-labs/torchfix/
Type of change
Feature/Issue validation/testing
This should be a no-op.