Support customizing how built-in types are pickled for cloudpickle#34699
Support customizing how built-in types are pickled for cloudpickle#34699AdrS wants to merge 1 commit intoapache:masterfrom
Conversation
This is to enable customizing how sets are serialized to increase the pickling determinism. I'm modifying the vendored cloudpickle as a stop-gap measure until the cloudpickle maintainers review cloudpipe/cloudpickle#563. Issue: apache#34410
|
Assigning reviewers. If you would like to opt out of this review, comment R: @jrmccluskey for label python. Available commands:
The PR bot will only process comments in the main thread (not review comments). |
|
Passing to @claudevdm who has been working with dill and cloudpickle as of late, should have better context here |
| with _pickle_lock: | ||
| with io.BytesIO() as file: | ||
| pickler = cloudpickle.CloudPickler(file) | ||
| pickler = cloudpickle.PurePythonPickler(file) |
There was a problem hiding this comment.
As discussed offline we probably want to have this default to the fast pickler, and add an option to use slow pickler.
|
Should we vendor the cloudpickle tests as well if we are modifying the implementation this much? |
|
There are a bunch of failing tests e.g. |
|
Reminder, please take a look at this pr: @jrmccluskey |
|
Assigning new set of reviewers because Pr has gone too long without review. If you would like to opt out of this review, comment R: @tvalentyn for label python. Available commands:
|
+1. Given cloudpickle authors are not responsive, we might have to maintain this fork until our changes can be upstreamed. |
|
Reminder, please take a look at this pr: @tvalentyn |
|
waiting on author |
|
This pull request has been marked as stale due to 60 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@beam.apache.org list. Thank you for your contributions. |
|
This pull request has been closed due to lack of activity. If you think that is incorrect, or the pull request requires review, you can revive the PR at any time. |
This is to enable customizing how sets are serialized to increase the pickling determinism. I'm modifying the vendored cloudpickle as a stop-gap measure until the cloudpickle maintainers review cloudpipe/cloudpickle#563.
Note: It's easiest to review this change with the setting to hide whitespace.
Issue: #34410