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

DM-45138: Serialize worker parameters before dispatching #196

Merged
merged 1 commit into from
Jul 10, 2024
Merged

Conversation

rra
Copy link
Member

@rra rra commented Jul 10, 2024

Using pickle to serialize parameters for the workers runs the risk of not being able to unpickle in a backend using a different Python version and different library versions. Reduce the risk by always serializing the parameters model before dispatching, so what will be pickled is only a JSON-compatible dictionary, which should be safely portable.

Making this work properly required fixing a few bugs in the code to deserialize astropy data types since JSON serialization turns tuples into lists.

Unpin numpy, since that pin should no longer be necessary.

Using pickle to serialize parameters for the workers runs the risk
of not being able to unpickle in a backend using a different Python
version and different library versions. Reduce the risk by always
serializing the parameters model before dispatching, so what will be
pickled is only a JSON-compatible dictionary, which should be safely
portable.

Making this work properly required fixing a few bugs in the code to
deserialize astropy data types since JSON serialization turns tuples
into lists.

Unpin numpy, since that pin should no longer be necessary.
@rra rra merged commit 9963bbc into main Jul 10, 2024
3 checks passed
@rra rra deleted the tickets/DM-45138 branch July 10, 2024 19:51
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.

1 participant