Skip to content

Pickle module #176

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 6 commits into from
May 5, 2025
Merged

Pickle module #176

merged 6 commits into from
May 5, 2025

Conversation

atremblay
Copy link
Contributor

@atremblay atremblay commented Apr 25, 2025

Default behaviour of torch.load changed in pytorch 2.6. It used to have the argument weights_only=False, now it's weights_only=True.

By specifying the pickle_module to use during torch.save and torch.load, we can keep the new default value of weights_only=True.

https://pytorch.org/docs/stable/notes/serialization.html#weights-only

pickle_module exists at least since version 1.0.0 and the default value used to be pickle_module=pickle.

Copy link

netlify bot commented Apr 25, 2025

Deploy Preview for poutyne ready!

Name Link
🔨 Latest commit 6adc152
🔍 Latest deploy log https://app.netlify.com/sites/poutyne/deploys/68193814cd7ee70008808604
😎 Deploy Preview https://deploy-preview-176--poutyne.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@atremblay
Copy link
Contributor Author

There are a few steps that failed/canceled in the CI/CD for formatting issues. Not sure if I am supposed to do something about that.

@freud14
Copy link
Collaborator

freud14 commented Apr 25, 2025

Hi @atremblay , I'm currently on vacation so I'm going to look into your PR when I'm back in about two weeks. But yeah, if you can fix the formatting issue in the meantime, it would be great.

@freud14
Copy link
Collaborator

freud14 commented May 5, 2025

@atremblay Could you fix the formatting so that we can go ahead with this?

@atremblay
Copy link
Contributor Author

Ah think I figured it out. Was missing isort. Let's see if everything passes.

Copy link

codecov bot commented May 5, 2025

Codecov Report

Attention: Patch coverage is 80.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 94.21%. Comparing base (2742c75) to head (6adc152).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
poutyne/framework/callbacks/checkpoint.py 33.33% 2 Missing ⚠️
poutyne/framework/model_bundle.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##           master     #176   +/-   ##
=======================================
  Coverage   94.20%   94.21%           
=======================================
  Files          46       46           
  Lines        3277     3282    +5     
=======================================
+ Hits         3087     3092    +5     
  Misses        190      190           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@freud14 freud14 merged commit faa1952 into GRAAL-Research:master May 5, 2025
41 of 42 checks passed
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