Skip to content

Conversation

@cjfuller
Copy link
Collaborator

This commit makes it so that we use a zarr array backed by disk to do stitching in cases where the image is too large to fit into memory (based upon pstats's estimation of how much free memory there is as well as a heuristic multiplier of the expected memory usage of the output array). Since this uses disk for some operations, we expect some parts will be slower, and to mitigate this, we ensure that the output array ends up being level 0 of the zarr pyramid output, so that we don't have to make a second copy to disk.

I added a parameter to the input parameters that lets you force using this disk mode (which is useful for testing / profiling / debugging, or potentially for limiting production memory usage).

Tested by:

  • ./dev/run_tests.sh
  • lots of manual benchmarking on images of different sizes using the CLI

This commit makes it so that we use a zarr array backed by disk to do
stitching in cases where the image is too large to fit into memory
(based upon pstats's estimation of how much free memory there is as well
as a heuristic multiplier of the expected memory usage of the output
array). Since this uses disk for some operations, we expect some parts
will be slower, and to mitigate this, we ensure that the output array
ends up being level 0 of the zarr pyramid output, so that we don't have
to make a second copy to disk.

I added a parameter to the input parameters that lets you force using
this disk mode (which is useful for testing / profiling / debugging, or
potentially for limiting production memory usage).

Tested by:
- `./dev/run_tests.sh`
- lots of manual benchmarking on images of different sizes using the CLI
@cjfuller cjfuller requested a review from hongquanli January 20, 2025 22:35
@cjfuller cjfuller merged commit c5fa9db into main Jan 20, 2025
@cjfuller cjfuller deleted the colin/direct_to_zarr branch January 20, 2025 22:35
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.

2 participants