Uh oh!
There was an error while loading. Please reload this page.
[v3] fix: zarr v2 compatibility fixes for Dask - #2186
Conversation
- port normalize_chunks from v2 - add array.store property - default to append in create
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| if all(isinstance(c, (tuple | list)) for c in chunks): | ||
| # take first chunk size for each dimension | ||
| chunks = ( | ||
| c[0] for c in chunks | ||
| ) # TODO: check/error/warn for irregular chunks (e.g. if c[0] != c[1:-1]) |
There was a problem hiding this comment.
except for this block, the rest of this function came from 2.x
will-moore
commented
Sep 16, 2024
Hi @jhamman - thanks for looking into this! Here is what we're doing to load remote data with dask and Zarr v2... With zarr v3 I'm not getting as far as opening with dask as I'm failing to access any remote data, using a couple of different approaches here (using zarr from this branch), both failing with exceptions noted below... Is there some other way that I can try to load remote data? Many thanks, |
also fix failing ci
TomAugspurger
commented
Sep 17, 2024
Thanks for trying this out @will-moore. Can you share the full traceback? In the meantime, I would expect something like g=zarr.open_group(store=zarr.store.RemoteStore("s3://idr", endpoint_url="http://uk1s3.embassy.ebi.ac.uk", anon=True), path="zarr/v0.4/idr0062A/6001240.zarr")Can you let us know if that works? It doesn't for me, but I'm not sure if some network / authentication setup is required. |
…nto fix/dask-compat
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
That sample you tried there is zarr v2 data, and it also seemed to need gives me: On my machine, I unfortunately get: this errorWhich is an issue that seems to affect just me, as I already reported at ome/ome2024-ngff-challenge#22 and I can't seem to fix on my machine, which is kinda annoying! Thanks for your help! |
…nto fix/dask-compat
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| parents = [ | ||
| AsyncGroup( | ||
| metadata=GroupMetadata(zarr_format=node.metadata.zarr_format), | ||
| store_path=StorePath(store=node.store_path.store, path=""), | ||
| ) | ||
| ] |
There was a problem hiding this comment.
@TomAugspurger - this was needed to enable zarr.create(store={}, path="a") such that the root zarr.json is created in addition to a/zarr.json.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
TomAugspurger
left a comment
There was a problem hiding this comment.
Looks good, just a couple minor things.
| # To enable zarr.create(store, path="a/b/c"), we need to create all the intermediate groups. | ||
| parents = _build_parents(self) | ||
| logger.debug("Ensure parents: %s", parents) |
| parents = [] | ||
| store = node.store_path.store | ||
| path = node.store_path.path | ||
| if not path: |
There was a problem hiding this comment.
Do you know whether this branch is covered by an existing test? If not, it might be good to add one.
There was a problem hiding this comment.
Yes, this path is highly exercised.
Uh oh!
There was an error while loading. Please reload this page.
normalize_chunksfrom v2array.storepropertycreatezarr.storetozarr.storagecloses#1953
xref: dask/dask#11388
TODO: