Skip to content

Support torch>=2.6 in word_language_model example#1347

Merged
msaroufim merged 1 commit into
pytorch:mainfrom
dvrogozh:fixes
May 18, 2025
Merged

Support torch>=2.6 in word_language_model example#1347
msaroufim merged 1 commit into
pytorch:mainfrom
dvrogozh:fixes

Conversation

@dvrogozh
Copy link
Copy Markdown
Contributor

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

CC: @msaroufim, @framoncg, @jafraustro

@netlify
Copy link
Copy Markdown

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
Copy Markdown
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.

Comment thread word_language_model/main.py
Update the example usage of `torch.load()` with required safe globals.

Signed-off-by: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
@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