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

Add support for Multiprocessing for PyLace's Engine. #159

Closed
schmidmt opened this issue Jan 11, 2024 · 0 comments · Fixed by #184
Closed

Add support for Multiprocessing for PyLace's Engine. #159

schmidmt opened this issue Jan 11, 2024 · 0 comments · Fixed by #184
Assignees
Labels
enhancement New feature or request Python Pertains to the Python API

Comments

@schmidmt
Copy link
Contributor

Presently, lace.Engine in PyLace does not support Pickling and cannot be easily used with Multiprocessing.
A workaround for this is to save the Engine to disk with Engine.save; however, the ergonomics of this could be improved.

There are a few options here:

  1. Add #[derive(Serialize,Deserialize)] to CoreEngine and implement pickle as a wrapper around bincode or the like. This is memory inefficient as the entire Engine, data and all, are copied to each Python instance, but it is the simplest method.
  2. Implement an out-of-process, perhaps a server/client model, which allows for Multiprocessing without the memory inefficiency.

I'm open to discussing potential solutions, as there's no clear best path.

@schmidmt schmidmt added enhancement New feature or request Python Pertains to the Python API labels Jan 11, 2024
@schmidmt schmidmt self-assigned this Jan 11, 2024
@schmidmt schmidmt linked a pull request Feb 13, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Python Pertains to the Python API
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant