-
-
Notifications
You must be signed in to change notification settings - Fork 659
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
Add Callback for saving pickled job info #2093
Conversation
output_dir.mkdir(parents=True, exist_ok=True) | ||
assert output_dir is not None | ||
with open(str(output_dir / filename), "wb") as file: | ||
pickle.dump(obj, file) |
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.
It's probably better from a compatibility / efficiency standpoint to pick an explicit protocol:
https://docs.python.org/3/library/pickle.html
protocol=4
seems like the most appropriate given our supported python version range
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.
good point, thanks for the link. reading through the doc it seems like there's some extra benefits in setting it to be the highest, so I update it to that. Let me know what you think :)
Add an experimental Callback for pickling job info. Having this as a Callback enables users to opt-in this behavior.
The doc updates will come after all of #1805 is completed.