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: more robust hashing & pickling when memoizing #80

Merged
merged 4 commits into from
Apr 8, 2024

Conversation

lars-reimann
Copy link
Member

Closes #75
Closes #79

Summary of Changes

  • Catch errors when attempting to pickle/hash a value.
  • Make dicts and lambdas serializable.

@lars-reimann lars-reimann requested a review from a team as a code owner April 8, 2024 12:20
@lars-reimann lars-reimann linked an issue Apr 8, 2024 that may be closed by this pull request
Copy link

github-actions bot commented Apr 8, 2024

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ PYTHON black 2 0 0 0.53s
✅ PYTHON mypy 2 0 2.22s
✅ PYTHON ruff 2 0 0 0.03s
✅ REPOSITORY git_diff yes no 0.01s

See detailed report in MegaLinter reports
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is graciously provided by OX Security

@lars-reimann lars-reimann force-pushed the 79-cant-pickle-local-object-if-lambdas-are-used branch from f2dcf53 to 1cd1c1f Compare April 8, 2024 12:22
Copy link

codecov bot commented Apr 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (8cf0b57) to head (b1c7416).
Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #80   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           11        11           
  Lines          504       514   +10     
=========================================
+ Hits           504       514   +10     

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

Copy link
Contributor

@WinPlay02 WinPlay02 left a comment

Choose a reason for hiding this comment

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

The comments should not block this PR, if it is needed urgently.
They will be addressed by the upcoming memoization-PR.

src/safeds_runner/server/_memoization_map.py Outdated Show resolved Hide resolved
src/safeds_runner/server/_memoization_map.py Outdated Show resolved Hide resolved
Co-authored-by: WinPlay02 <[email protected]>
@lars-reimann lars-reimann force-pushed the 79-cant-pickle-local-object-if-lambdas-are-used branch from 6cdbbe6 to 07066ee Compare April 8, 2024 16:37
@lars-reimann lars-reimann merged commit 25c49e2 into main Apr 8, 2024
8 checks passed
@lars-reimann lars-reimann deleted the 79-cant-pickle-local-object-if-lambdas-are-used branch April 8, 2024 17:10
lars-reimann pushed a commit that referenced this pull request Apr 9, 2024
## [0.8.1](v0.8.0...v0.8.1) (2024-04-09)

### Bug Fixes

* **deps:** bump pillow from 10.2.0 to 10.3.0 ([#77](#77)) ([32974d0](32974d0)), closes [#7928](https://github.com/Safe-DS/Runner/issues/7928) [#7912](https://github.com/Safe-DS/Runner/issues/7912) [#7883](https://github.com/Safe-DS/Runner/issues/7883) [#7925](https://github.com/Safe-DS/Runner/issues/7925) [#7920](https://github.com/Safe-DS/Runner/issues/7920) [#7818](https://github.com/Safe-DS/Runner/issues/7818) [#7918](https://github.com/Safe-DS/Runner/issues/7918) [#7658](https://github.com/Safe-DS/Runner/issues/7658) [#7209](https://github.com/Safe-DS/Runner/issues/7209) [#7884](https://github.com/Safe-DS/Runner/issues/7884) [#7888](https://github.com/Safe-DS/Runner/issues/7888) [#7894](https://github.com/Safe-DS/Runner/issues/7894) [#7900](https://github.com/Safe-DS/Runner/issues/7900) [#7891](https://github.com/Safe-DS/Runner/issues/7891) [#7893](https://github.com/Safe-DS/Runner/issues/7893) [#7882](https://github.com/Safe-DS/Runner/issues/7882) [#7870](https://github.com/Safe-DS/Runner/issues/7870) [#7872](https://github.com/Safe-DS/Runner/issues/7872) [#7881](https://github.com/Safe-DS/Runner/issues/7881) [#7880](https://github.com/Safe-DS/Runner/issues/7880) [#7644](https://github.com/Safe-DS/Runner/issues/7644) [#7753](https://github.com/Safe-DS/Runner/issues/7753) [#7706](https://github.com/Safe-DS/Runner/issues/7706) [#7791](https://github.com/Safe-DS/Runner/issues/7791) [#7788](https://github.com/Safe-DS/Runner/issues/7788) [#7823](https://github.com/Safe-DS/Runner/issues/7823) [#7840](https://github.com/Safe-DS/Runner/issues/7840) [#7842](https://github.com/Safe-DS/Runner/issues/7842) [#7821](https://github.com/Safe-DS/Runner/issues/7821) [#7797](https://github.com/Safe-DS/Runner/issues/7797) [#7798](https://github.com/Safe-DS/Runner/issues/7798) [#7713](https://github.com/Safe-DS/Runner/issues/7713) [#7827](https://github.com/Safe-DS/Runner/issues/7827) [#7838](https://github.com/Safe-DS/Runner/issues/7838) [#7843](https://github.com/Safe-DS/Runner/issues/7843) [#7852](https://github.com/Safe-DS/Runner/issues/7852) [#7855](https://github.com/Safe-DS/Runner/issues/7855) [#7849](https://github.com/Safe-DS/Runner/issues/7849) [#7709](https://github.com/Safe-DS/Runner/issues/7709) [#7779](https://github.com/Safe-DS/Runner/issues/7779) [#7841](https://github.com/Safe-DS/Runner/issues/7841) [#7782](https://github.com/Safe-DS/Runner/issues/7782) [#7804](https://github.com/Safe-DS/Runner/issues/7804) [#7810](https://github.com/Safe-DS/Runner/issues/7810) [#7744](https://github.com/Safe-DS/Runner/issues/7744) [#7928](https://github.com/Safe-DS/Runner/issues/7928) [#7927](https://github.com/Safe-DS/Runner/issues/7927) [#7883](https://github.com/Safe-DS/Runner/issues/7883) [#7818](https://github.com/Safe-DS/Runner/issues/7818) [#7918](https://github.com/Safe-DS/Runner/issues/7918) [#7920](https://github.com/Safe-DS/Runner/issues/7920) [#7658](https://github.com/Safe-DS/Runner/issues/7658) [#7209](https://github.com/Safe-DS/Runner/issues/7209) [#7884](https://github.com/Safe-DS/Runner/issues/7884) [#7888](https://github.com/Safe-DS/Runner/issues/7888) [#7894](https://github.com/Safe-DS/Runner/issues/7894) [#7900](https://github.com/Safe-DS/Runner/issues/7900) [#7891](https://github.com/Safe-DS/Runner/issues/7891) [#7893](https://github.com/Safe-DS/Runner/issues/7893) [#7882](https://github.com/Safe-DS/Runner/issues/7882) [#7870](https://github.com/Safe-DS/Runner/issues/7870) [#7872](https://github.com/Safe-DS/Runner/issues/7872) [#7928](https://github.com/Safe-DS/Runner/issues/7928) [#7927](https://github.com/Safe-DS/Runner/issues/7927)
* dynamic memoization calls ([#82](#82)) ([172b398](172b398))
* more robust hashing & pickling when memoizing ([#80](#80)) ([25c49e2](25c49e2)), closes [#75](#75) [#79](#79)
@lars-reimann
Copy link
Member Author

🎉 This PR is included in version 0.8.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@lars-reimann lars-reimann added the released Included in a release label Apr 9, 2024
lars-reimann pushed a commit that referenced this pull request Apr 9, 2024
## [0.9.0](v0.8.0...v0.9.0) (2024-04-09)

### Features

* dynamic memoization calls ([#82](#82)) ([9d31292](9d31292))

### Bug Fixes

* **deps:** bump pillow from 10.2.0 to 10.3.0 ([#77](#77)) ([32974d0](32974d0)), closes [#7928](https://github.com/Safe-DS/Runner/issues/7928) [#7912](https://github.com/Safe-DS/Runner/issues/7912) [#7883](https://github.com/Safe-DS/Runner/issues/7883) [#7925](https://github.com/Safe-DS/Runner/issues/7925) [#7920](https://github.com/Safe-DS/Runner/issues/7920) [#7818](https://github.com/Safe-DS/Runner/issues/7818) [#7918](https://github.com/Safe-DS/Runner/issues/7918) [#7658](https://github.com/Safe-DS/Runner/issues/7658) [#7209](https://github.com/Safe-DS/Runner/issues/7209) [#7884](https://github.com/Safe-DS/Runner/issues/7884) [#7888](https://github.com/Safe-DS/Runner/issues/7888) [#7894](https://github.com/Safe-DS/Runner/issues/7894) [#7900](https://github.com/Safe-DS/Runner/issues/7900) [#7891](https://github.com/Safe-DS/Runner/issues/7891) [#7893](https://github.com/Safe-DS/Runner/issues/7893) [#7882](https://github.com/Safe-DS/Runner/issues/7882) [#7870](https://github.com/Safe-DS/Runner/issues/7870) [#7872](https://github.com/Safe-DS/Runner/issues/7872) [#7881](https://github.com/Safe-DS/Runner/issues/7881) [#7880](https://github.com/Safe-DS/Runner/issues/7880) [#7644](https://github.com/Safe-DS/Runner/issues/7644) [#7753](https://github.com/Safe-DS/Runner/issues/7753) [#7706](https://github.com/Safe-DS/Runner/issues/7706) [#7791](https://github.com/Safe-DS/Runner/issues/7791) [#7788](https://github.com/Safe-DS/Runner/issues/7788) [#7823](https://github.com/Safe-DS/Runner/issues/7823) [#7840](https://github.com/Safe-DS/Runner/issues/7840) [#7842](https://github.com/Safe-DS/Runner/issues/7842) [#7821](https://github.com/Safe-DS/Runner/issues/7821) [#7797](https://github.com/Safe-DS/Runner/issues/7797) [#7798](https://github.com/Safe-DS/Runner/issues/7798) [#7713](https://github.com/Safe-DS/Runner/issues/7713) [#7827](https://github.com/Safe-DS/Runner/issues/7827) [#7838](https://github.com/Safe-DS/Runner/issues/7838) [#7843](https://github.com/Safe-DS/Runner/issues/7843) [#7852](https://github.com/Safe-DS/Runner/issues/7852) [#7855](https://github.com/Safe-DS/Runner/issues/7855) [#7849](https://github.com/Safe-DS/Runner/issues/7849) [#7709](https://github.com/Safe-DS/Runner/issues/7709) [#7779](https://github.com/Safe-DS/Runner/issues/7779) [#7841](https://github.com/Safe-DS/Runner/issues/7841) [#7782](https://github.com/Safe-DS/Runner/issues/7782) [#7804](https://github.com/Safe-DS/Runner/issues/7804) [#7810](https://github.com/Safe-DS/Runner/issues/7810) [#7744](https://github.com/Safe-DS/Runner/issues/7744) [#7928](https://github.com/Safe-DS/Runner/issues/7928) [#7927](https://github.com/Safe-DS/Runner/issues/7927) [#7883](https://github.com/Safe-DS/Runner/issues/7883) [#7818](https://github.com/Safe-DS/Runner/issues/7818) [#7918](https://github.com/Safe-DS/Runner/issues/7918) [#7920](https://github.com/Safe-DS/Runner/issues/7920) [#7658](https://github.com/Safe-DS/Runner/issues/7658) [#7209](https://github.com/Safe-DS/Runner/issues/7209) [#7884](https://github.com/Safe-DS/Runner/issues/7884) [#7888](https://github.com/Safe-DS/Runner/issues/7888) [#7894](https://github.com/Safe-DS/Runner/issues/7894) [#7900](https://github.com/Safe-DS/Runner/issues/7900) [#7891](https://github.com/Safe-DS/Runner/issues/7891) [#7893](https://github.com/Safe-DS/Runner/issues/7893) [#7882](https://github.com/Safe-DS/Runner/issues/7882) [#7870](https://github.com/Safe-DS/Runner/issues/7870) [#7872](https://github.com/Safe-DS/Runner/issues/7872) [#7928](https://github.com/Safe-DS/Runner/issues/7928) [#7927](https://github.com/Safe-DS/Runner/issues/7927)
* more robust hashing & pickling when memoizing ([#80](#80)) ([25c49e2](25c49e2)), closes [#75](#75) [#79](#79)
@lars-reimann
Copy link
Member Author

🎉 This PR is included in version 0.9.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released Included in a release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can't pickle local object if lambdas are used Unhashable types
3 participants