Skip to content

Support torch>=2.6 in word_language_model example #1347

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

Merged
merged 1 commit into from
May 18, 2025

Conversation

dvrogozh
Copy link
Contributor

Update example usage of torch.load() with required safe globals.

CC: @msaroufim, @framoncg, @jafraustro

Copy link

netlify bot commented May 16, 2025

Deploy Preview for pytorch-examples-preview canceled.

Name Link
🔨 Latest commit b231928
🔍 Latest deploy log https://app.netlify.com/projects/pytorch-examples-preview/deploys/6827d39f130bac000826c29b

@@ -1 +1 @@
torch<2.6
torch>=2.6
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

torch.serialization.safe_globals I've used in this PR appeared in torch 2.5. The torch.load default to load weights was changed to True in 2.6. Since we in any case plan to bump dependency to 2.6 by using torch.accelerate, I think we can update the requirement to 2.6 right away.

Update the example usage of `torch.load()` with required safe globals.

Signed-off-by: Dmitry Rogozhkin <[email protected]>
@msaroufim msaroufim merged commit ac7e960 into pytorch:main May 18, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants