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

Allow cell reuse when creating cells in parallel #48

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

fbeutel
Copy link
Contributor

@fbeutel fbeutel commented Jul 29, 2021

Sometime, the cell creation is expensive and benefits from parallelization. At the same time, some sub-cells can be reused between cells.

Currently, this fails because when ProcessPoolExecutor (or similar parallelization structures) are used, sub-cells are pickled and deserialized again. When merging the parallel cells together in the end, comparison for those sub-cells fails because they have no common identity anymore.

This adds a UUID when a cell is created, such that cells can be identified by their UUID.

Possible downside is that if a user modifies a sub-cell after it has been pickled, the changes might get lost, but this can easily be avoided by finishing the sub-cell before using 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

Successfully merging this pull request may close these issues.

1 participant