-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
[2/n subset refactor] Make TimeWindowPartitionsDefinition serializable #17660
Merged
clairelin135
merged 5 commits into
master
from
claire/tw-partitions-def-whitelist-for-serdes
Nov 14, 2023
+94
−11
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
ed8925c
add whitelist for serdes
clairelin135 ee23877
create serializable time window partitions def named tuple
clairelin135 eb16480
update tests and comments
clairelin135 c15fda6
add option to disable same ordering
clairelin135 e97b5b2
prevent TimeWindowPartitionsDefinition from being pickled
clairelin135 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@alangenfeld do you know if we can remove this check altogether? Looks like when rebuild named tuples during deserialization we use kwargs, so this might not be needed anymore
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
heres the history i could dig up, unfortunate we are locked out of our phabricator content now
52be7e8
#2372
I think
PipelineRun
was getting pickled when passed around inmultiprocessing
contexts.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cant_pickle
to more clearly advertise what opting out of the protection representsThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the context here.
I renamed the param to
is_pickleable
. I also overrode a__getstate__
method onTimeWindowPartitionsDefinition
that enables raising an error when attempting to pickle:https://docs.python.org/3/library/pickle.html#handling-stateful-objects