-
-
Notifications
You must be signed in to change notification settings - Fork 302
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
zarr v3 does not accept stores of type FSMap #2706
Comments
accepting instances of I will let the fsspec experts weigh in on whether there's any good reason not to accept |
This was an intentional breaking change. The Fsspec's FSMap interface was used as a drop in for Zarr's previous store interface (i.e. If you have a fsspec FileSystem, you can create the store directly though. Something like this should work: import fsspec
import zarr
fs = fsspec.filesystem("s3", asynchronous=True)
store = zarr.storage.FsspecStore(fs, path="bucket/foo/bar")
z = zarr.open(store=mapper, shape=(100, 100), chunks=(10, 10), dtype="f4") Note that the |
I'll label this as docs, since it would be good to put the above comment in our migration guide. |
This is going to bite a lot of people. 😬 It is relatively easy to convert an |
@martindurant will know best but remember that we're using Fsspec's async interface which is not active in most (any?) |
Rather than wrapping, passing the filesystem and path arguments directly seems the right thing to do, which was already suggested above. I'm not sure what might happen if a (sync) FSMap was used at the (hidden) dict within a (async) MemoryStore. It would probably work and for local files not make a performance difference? |
Zarr version
v3.0.0
Numcodecs version
v0.14.1
Python Version
3.11.11
Operating System
Mac
Installation
using pip into conda environment
Description
With Zarr v2, I was able to pass a store of type
fsspec.mapping.FSMap
. However, with Zarr v3, I get the following error:Is this a bug, a breaking change, or was passing mappers like FSMap not officially supported even in Zarr v2?
The snippet below only works with Zarr v2.
Steps to reproduce
Additional output
The text was updated successfully, but these errors were encountered: