-
Notifications
You must be signed in to change notification settings - Fork 6
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
tensorstore support #26
Comments
This will be useful for alternative viewing in mehta-lab/recOrder#297. |
I'm not sure if I'm reading this from the TensorStore documentation for the
Does this mean that it does not support other OS? Or this sentence only applies to Windows since Linux and macOS are naturally POSIX-compatible? |
Another question related to #18 (comment): |
@JoOkuma @AhmetCanSolak From your experience, is TS mature enough to be the only Zarr backend for iohub? Is there any missing feature as compared to zarr-python that we might find blocking in the future? |
@ziw-liu , they have the fill value parameter.
I think that's the case, because I've been using on Linux for a while.
Nothing comes to mind right now. I never tried using with datasets with multiple "wells", but ours light-sheet dataset sometimes have multiples keys, so it should work fine. |
Are those multiple keys multiple zarrays or zgroups? I couldn't find documentation about managing dataset hierarchy in TS. Can you try with this example OME-NGFF HCS dataset? Edit: aka the equivalent for this feature in zarr-python, which is essential for NGFF support. |
I think it can be the only Zarr backend, we don't need to support pre-Windows10, we don't have any such machine at hub AFAIK. It is pretty feature complete also. TensorStore supports nested Zarr groups. What do you want to test @ziw-liu with the example OME-NGFF HCS dataset? If you could give me more details, I am happy to help testing. |
Just to see if TS can do basic reading/writing with it. I'm a bit confused as the words 'group' and 'hierarchy' don't seem to exist at all in the doc and issues. |
Also not sure about how the Zarr attributes ( |
The way I understand it (please correct me where I am wrong @JoOkuma), you can use I opened OME-NGFF HCS Dataset without any issues with following script:
Output:
|
Sorry I wasn't quite clear, by:
I meant to ask if TS is a complete implementation of the Zarr specification and iohub can stop depending on zarr-python if it used TS. And now it seems that TS only implemented the array storage protocol. Then essentially we still need zarr-python around, and adding TS is a '+1 dependency' move. I think it will significantly increase the complexity of code, as the thing (reading an array) we can do with one line via zarr-python now needs 10+ lines constructing an extra json object.
I couldn't find how TS handles |
I dug a little deeper into this in some more general use cases that we did not try in DEXP.
Therefore, I think it should be an optional backend, and it can be implemented later on top of the default zarr backend, I'm glad to help with this. |
I don't think it's worth implementing our own code to transverse the zarr hierarchy to avoid depending on
|
@JoOkuma @AhmetCanSolak Thanks for the input! For now I will keep using zarr-python. And I imagine adding from iohub.ngff import HCSDataset
import numpy as np
dataset = HCSDataset.open("hcs.zarr", mode="a")
image = np.random.randint((1, 2, 3, 1024, 1024), dtype=np.uint16)
# uses zarr-python
dataset["B/5/2/0"] = image
# uses tensorstore
write_future = dataset["B/5/3/0"].delayed_write(image)
write_future.result() |
I would suggest us to have TS as a backend option @ziw-liu in the future. Datasets read with |
Tensorstore could be used for the zarr backend.
A few advantages are:
np.asarray
The text was updated successfully, but these errors were encountered: