-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Flexible Backend - AbstractDataStore definition #4309
Comments
Note that the above proposals only address the store / encoding part the backend API. We will address the |
Thanks @alexamici I'm a bit behind here: what's an example of a filter? A selection of the data? Edit: as discussed filter == encoding |
We agreed with @shoyer to go with proposal 3 for reading: the backends will return a fully build Among other advantages this reduces the amount of backend-specific documentation as the documentation of The one bit of documentation that needs addressing is the use of |
@shoyer and @jhamman, I'm looking into the write support and if we let a backend return a I'm not sure what options for in-place change are supported, but I see at least |
@shoyer & @jhamman just to give you an idea, I aim to see def open_dataset(filename_or_obj, *, engine=None, chunks=None, cache=None, backend_kwargs=None, **kwargs):
filename_or_obj = nomalize_filename_or_obj(filename_or_obj)
if engine is None:
engine = autodetect_engine(filename_or_obj)
open_backend_dataset = get_opener(engine)
backend_ds = open_backend_dataset(filename_or_obj, **backend_kwargs, **kwargs)
ds = dataset_from_backend_dataset(
backend_ds, chunks, cache, filename_or_obj=filename_or_obj, **kwargs
)
return ds Where the key observation is that |
I'm looking at other bits of knowledge of how backends work that are still present in the generic parts of We see We aim at removing On the other hand |
I just want to do a small recap of the current proposals for the class AbstractDataStore refactor discussed with @shoyer, @jhamman, and @alexamici.
Proposal 1: Store returns:
Xarray applies to every variable only the filters selected by the backend before building the xr.Dataset.
Proposal 2: Store returns:
Xarray builds the xr.Dataset
Proposal 3: Store returns:
Before going on I'd like to collect pros and cons. For my understanding:
Proposal 1
pros:
cons:
Proposal 2
pros:
cons:
decode_times
means in their case)The minimal interface would be something like that:
Proposal 3
pros w.r.t. porposal 2:
cons?
Any suggestions?
The text was updated successfully, but these errors were encountered: