question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

da.from_zarr ignores Zarr's dimension_separator

See original GitHub issue

What happened:

Zarr arrays that have been stored with “/” as the dimension_separator attribute (in .zarray) have no data in them when opened with da.from_zarr. See https://github.com/zarr-developers/zarr-python/pull/715

What you expected to happen:

All Zarr stores in the zarr-python repository were updated in https://github.com/zarr-developers/zarr-python/pull/716 to read this new metadata. The two options I can think of are either using a full store like FSStore in from_zarr or adding support for dimension_separator directly.

cc: @martindurant

Minimal Complete Verifiable Example:

import zarr as zr
import dask.array as da

z = zr.storage.FSStore(
    "foo.zarr",
    dimension_separator="/",
    auto_mkdir=True,
    mode="w",
)
a = zr.creation.array(store=z, data=[range(4) for x in range(4)])

# Passes
base = da.from_zarr(z, "")
m = base.max().compute()
assert m == 3, m

# Fails
base = da.from_zarr("foo.zarr")
m = base.max().compute()
assert m == 3, m

Anything else we need to know?:

Originally reported in: https://github.com/zarr-developers/zarr-python/pull/709#issuecomment-834118324

Environment:

  • Dask version: 2021.5.0
  • Python version: 3.9.4
  • Operating System: OSX 11.2.3
  • Install method (conda, pip, source):
conda create -n dask dask zarr fsspec

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
martindurantcommented, Jun 15, 2021

OK, so when that’s in, I’ll fix dask. It will simply pass all arguments to zarr and have exactly the same behaviour.

0reactions
joshmoorecommented, Aug 23, 2021
Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found