You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, it is not possible to view how many chunks are initialized in an array inside a group.
I was able to track it down to a mismatch of the outputs of the functions z.store_path.store.list_prefix(prefix=z.store_path.path) and z._iter_chunk_keys().
Steps to reproduce
importzarr# Create a group with two arraysroot=zarr.group("reproduction.zarr")
root.create("x", shape=(1000, 1000), chunks=(100, 100), dtype="f4")
root.create("y", shape=(1000, 1000), chunks=(100, 100), dtype="uint8")
root.tree()
fromzarr.core.arrayimportchunks_initialized# Now check which chunks are initialized (should be an empty tuple)awaitchunks_initialized(root["x"])
> ()
# Now fill two chunksroot["x"][0:100, 0:100] =1.0root["x"][100:200, 0:100] =2.0# Now check which chunks are initialized (should be a tuple with two chunks)awaitchunks_initialized(root["x"])
> () # <-- This shouldn't be empty
# Further investigate what happens in "chunks_initialized()"store_contents= [xasyncforxinroot["x"].store_path.store.list_prefix(prefix=root["x"].store_path.path)]
store_contents> ['x/zarr.json', 'x/c/1/0', 'x/c/0/0']
good report, and sorry for the bug. seems like we need to relativize the output of list_prefix, or absolutifiy the values in iter_chunk_keys. Since this is so obviously wrong that I'm wondering how our tests did not catch it.
Zarr version
v3.0.2
Numcodecs version
v0.15.1
Python Version
3.11
Operating System
Linux
Installation
uv add zarr
Description
Currently, it is not possible to view how many chunks are initialized in an array inside a group.
I was able to track it down to a mismatch of the outputs of the functions
z.store_path.store.list_prefix(prefix=z.store_path.path)
andz._iter_chunk_keys()
.Steps to reproduce
Additional output
No response
The text was updated successfully, but these errors were encountered: