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

Use __getstate__ and __setstate__ for propagator serialization #139

Merged
merged 3 commits into from
Jan 24, 2025

Conversation

akoumjian
Copy link
Contributor

Rather than instantiate propagators in the workers implicitly by using self.dict and self.class, the proper way to do this is to take advantage of dunder methods getstate and setstate. Now we can pass in propagator instances directly without fear of nasty stateful bits or non-initialization keyword arguments getting passed around.

Here we implement them as required in the ABC. Tests will fail until pointing to updated adam-assist in the development requirements.

@akoumjian akoumjian merged commit 36d9308 into main Jan 24, 2025
0 of 2 checks passed
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