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

Storage: Use the same tools for short and long term serialization #171

Closed
liamhuber opened this issue Jan 22, 2024 · 1 comment
Closed

Comments

@liamhuber
Copy link
Member

Right now short term serialization (for executors) uses __get/setstate__ and handles everything, while long term (file storage) serialization uses a bespoke solution and only handles nodes that live in a .py file.

Since we'd like so support (with a warning maybe) long-term storage of in-notebook nodes, we'll need to bring in some element of the pickle-style storage in there anyhow. Thus, there is probably room to get these two styles of serialization using the same infrastructure -- namely __get/setstate__. This was my initial attack prior to #160, and has since been requested by @jan-janssen, so it's worth taking another crack at this approach.

@liamhuber
Copy link
Member Author

Everything except for the while-loop is now fully pickle-compliant (as long as you don't stick anything un-pickleable as data on the node; #293 #303 etc), and as long as all the nodes are somewhere importable (i.e. not in main), you can even use the standard concurrent.futures.ProcessPoolExecutor (#304).

So this is actually just waiting on a pickle-compliant long-term storage solution and I will close it.

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

No branches or pull requests

1 participant