Skip to content
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

fix FutureWarning with torch.load #27

Merged
merged 1 commit into from
Aug 19, 2024
Merged

fix FutureWarning with torch.load #27

merged 1 commit into from
Aug 19, 2024

Conversation

HiDolen
Copy link
Contributor

@HiDolen HiDolen commented Aug 5, 2024

This pull request addresses the FutureWarning issue described in issue #26.

  • Updated torch.load to use weights_only=True to avoid potential security risks and to comply with future PyTorch updates.
  • Tested with PyTorch version 2.4.0.

@lucidrains
Copy link
Owner

@HiDolen how far back in torch versions does this work? should i enforce a minimum torch version?

@HiDolen
Copy link
Contributor Author

HiDolen commented Aug 19, 2024

@HiDolen how far back in torch versions does this work? should i enforce a minimum torch version?

The weights_only feature was added in version 1.13 of PyTorch. A FutureWarning will occur in version 2.4.

I think it's a good idea to have the version higher than 2.0.

@lucidrains lucidrains merged commit 884ec97 into lucidrains:main Aug 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants