-
Notifications
You must be signed in to change notification settings - Fork 1
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
Move create_pyramid to write_pyramid, to avoid repeated calls of heavy functions #97
Comments
With @mfranzon, we came up with this minimal-working example that seems to solve the issue.
This writes a large array of shape |
Not really. This issue concerns our local changes (where we try to use dask's A typical single-site runtime is this one:
If you have a feeling that this is slow, let's look more carefully into it. |
Sure |
Hmm, good point. 4 minutes per site is actually fine speed-wise for cellpose I'd say from my experience. I was more a bit surprised that the 72 site (9x8) example took some 5 hours. But actually, if it just runs them sequentially, that does make sense (72*4 min = 4.8h). So good that you're testing the parallel running approach here then :) |
Let's continue under #64 (comment) |
Slightly improved example (more similar to what we actually aim at):
|
Note that this issue applies to EDIT: |
As of 9ba643e there is a new More tests are underway (I'm also taking this opportunity to also write some actual unit tests for some of these tasks), before I'm sure that everything works. To reiterate the goals, we aim at a situation where:
Something else to check/fix: is Take-home message: lazy computations are tricky! Let's make sure that whenever |
Really valuable learnings, thanks for working through this & summarizing the take-aways @tcompa ! |
Now testing the full workflow, after several changes here and there (both in the pyramid-writing function and in the two labeling/correction tasks), and after unit tests for both tasks are in-place. I am afraid we are hitting memory problems again (some tasks in the monitoring seem to be using much more CPU memory than expected), I will look at it again. |
The issue of multiple calls within illumination correction or within per-FOV labeling has already been addressed, and it is now tested in The only missing part is the unit test of |
The unit test added in e3a029e confirms that the bug also affects |
The fix in 32a9a92 solves the issue (i.e. the number of By the way, this also solves #53 (comment), by always using the same |
Fixed with #133. |
At the moment, the pyramid-creation function returns a list of delayed arrays, for all levels, and they all include the full computation graph (including, for instance, the cellpose segmentation part). This means that everything is repeated
num_levels
times, which is obviously not an option since the beginning of the calculation may be very heavy.The text was updated successfully, but these errors were encountered: