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

Use weights_only=True when loading SockeyeModel parameters. #1112

Merged
merged 4 commits into from
May 22, 2024

Conversation

mjdenkowski
Copy link
Contributor

@mjdenkowski mjdenkowski commented May 22, 2024

Use weights_only=True when loading SockeyeModel parameters. From torch.load documentation:

torch.load() unless weights_only parameter is set to True, uses pickle module implicitly, which is known to be insecure.

Pull Request Checklist

  • Changes are complete (if posting work-in-progress code, prefix your pull request title with '[WIP]'
    until you can check this box.
  • Unit tests pass (pytest)
  • System tests pass (pytest test/system)
  • Passed code style checking (./style-check.sh)
  • Updated major/minor version in sockeye/__init__.py. Major version bump if this is a backwards incompatible change.
  • Updated CHANGELOG.md

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@mjdenkowski mjdenkowski changed the title [WIP] Use weights_only=True when loading SockeyeModel parameters. Use weights_only=True when loading SockeyeModel parameters. May 22, 2024
@mjdenkowski mjdenkowski deleted the weights_only branch May 22, 2024 16:12
@mjdenkowski mjdenkowski restored the weights_only branch May 22, 2024 16:14
@mjdenkowski mjdenkowski reopened this May 22, 2024
@mjdenkowski
Copy link
Contributor Author

It looks like macos-latest no longer supports Python versions 3.7 and 3.8. I've set our checks to use macos-12, which supports both.

@mjdenkowski mjdenkowski merged commit b0a2cfc into main May 22, 2024
4 checks passed
@mjdenkowski mjdenkowski deleted the weights_only branch May 22, 2024 17:18
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