Conversation
|
Added almost all functionality. I'm trying very hard to maintain existing acquire-zarr behavior. One thing that will have to change is some of the downsampling behavior. acquire-zarr treats x and y in a special way, where chucky does not. This impacts some rules determining when to stop downsampling certain dimensions as we get to higher (coarser) levels of detail (lod). If the user doesn't want to allow the aspect of ratios of dimensions to change, then we must stop downsampling as soon as any dimension becomes too small; "Too small" means it's one chuck or fewer in that dimension. If aspect ratios can change, then we just stop downsampling dimensions that are too small and continue with the others until there are no dimensions left - everything fits in one chunk. This is almost what acquire-zarr does. The aspect ratio of x and y are held fixed, but the others can change. Chunk sizes also vary. In chucky, variable chunk size causes all kinds of headaches - so I'll constrain to a constant chunk size. I'll add an option letting a user select whether they want a variable aspect ratio or not. I've already got a max lod parameter. The lod's will be computed until any/all dimensions are 1 or fewer chunks wide or the max lod is hit. |
aliddell
left a comment
There was a problem hiding this comment.
Couple of things need looking at.
| assert np.array_equal(array, data) | ||
|
|
||
|
|
||
| @pytest.mark.timeout(300) |
There was a problem hiding this comment.
not when things are working :D I vote for keeping it.
| .idea | ||
| .vscode | ||
| .vs | ||
| .claude |
There was a problem hiding this comment.
This is going to get out of date very quickly (if it isn't already) and it probably won't be relevant after merge. Consider deleting this file and moving the contents to the PR description instead.
| const char* metadata_key, | ||
| const char* metadata) | ||
| { | ||
| if (!stream || !metadata_key || !metadata) { |
There was a problem hiding this comment.
Rejecting NULL-valued metadata_key is a behavior change. It should be accepted if and only if we have just the one array.
| const ZarrArraySettings* as = &settings->arrays[index]; | ||
| if (!as->output_key) { | ||
| *key = NULL; | ||
| return ZarrStatusCode_Success; |
There was a problem hiding this comment.
Seems wrong to return Success with a NULL-valued *key.
On closer inspection, the original code dedupes and regularizes the keys, so the behavior is changed here.
Co-authored-by: Alan Liddell <alan.c.liddell@gmail.com>
Co-authored-by: Alan Liddell <alan.c.liddell@gmail.com>
Co-authored-by: Alan Liddell <alan.c.liddell@gmail.com>
Rename the CPU shim distribution from `acquire-zarr-cpu` to `acquire-zarr` so it satisfies downstream `acquire-zarr>=...` requirements (e.g. ome-writers[acquire-zarr]) as a transparent drop-in replacement for the baseline package, without consumers having to edit their dependency name. The GPU variant stays `acquire-zarr-gpu`. Used to build the cp313 / linux_x86_64 wheel trialed in czbiohub-sf/livescreen-acquisition#169. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Mirror the CPU rename (3692f4c): rename the GPU shim distribution from `acquire-zarr-gpu` to `acquire-zarr` so the GPU wheel is a transparent drop-in for downstream `acquire-zarr>=...` requirements (e.g. ome-writers[acquire-zarr]), matching the CPU wheel. Both shim/python and shim/python-gpu now build dist `acquire-zarr`; they're published/consumed as separate wheels (CPU vs GPU), never on the same index. Used to build the cp313 / sm_120 GPU wheel trialed in czbiohub-sf/livescreen-acquisition#169. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Packaging note: chucky drop-in wheels (
|
| Release | Backend | Deps |
|---|---|---|
chucky-cpu-cp313 |
CPU | vcpkg static (aws-c-s3/blosc/lz4/zstd/openssl) |
chucky-gpu-cp313 |
GPU sm_120 |
CUDA 13.2 + nvcomp 5.2 (static); needs only libcuda.so.1 at runtime |
Consumed by czbiohub-sf/livescreen-acquisition#169.
zstd / uncompressed — blosc-lz4 and blosc-zstd are rejected at stream-create (shim/chucky/src/stream/config.c: "max_output_size is 0 (unsupported codec?)"). The downstream trial works around this by defaulting to zstd. Flagging in case GPU CODEC_BLOSC_* support is in scope for this PR (the CPU backend handles blosc fine).
chucky is a new streaming backend for acquire.
It adds support for gpu acceleration and there are some improvements to cpu-based streaming as well.
Getting it in is going to take a few steps.
I'm starting with this PR by creating a "shim". The shim is a thin layer implementing the public c api of acquire using chucky. I will use that to gradually walk through acquire-zarr's tests, changing chucky as necessary.
This should allow us to make some standalone libraries/wheels we can test for a bit and identify when to switch the back-ends more permanently.