KEMBAR78
Fix warning when pickle.load torch.Storage by pytorchbot · Pull Request #133597 · pytorch/pytorch · GitHub
Skip to content

Conversation

@pytorchbot
Copy link
Collaborator

Fixes #130242

Since torch.save does not use pickle for storages, the torch.load in _load_from_bytes should not ever be called when torch.load-ing a checkpoint. Setting weights_only=False explicitly in _load_from_bytes to avoid the weights_only warning when using the pickle module

Stack from ghstack (oldest at bottom):

Fixes #130242

Since `torch.save` does not use pickle for storages, the `torch.load` in `_load_from_bytes` should not ever be called when `torch.load`-ing a checkpoint. Setting weights_only=False explicitly in `_load_from_bytes` to avoid the weights_only warning when using the pickle module

Pull Request resolved: #130246
Approved by: https://github.com/albanD

(cherry picked from commit dfd1d19)
@pytorch-bot
Copy link

pytorch-bot bot commented Aug 15, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/133597

Note: Links to docs will display an error until the docs builds have been completed.

❌ 3 New Failures

As of commit 6808196 with merge base b66e3f0 (image):

NEW FAILURES - The following jobs have failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@atalman atalman merged commit 30faa17 into release/2.4 Aug 21, 2024
@atalman atalman deleted the cherry-pick-130246-by-pytorch_bot_bot_ branch August 21, 2024 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

open source release notes: nn release notes category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants