-
Notifications
You must be signed in to change notification settings - Fork 22
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
Inline loaded variables into kerchunk references #73
Conversation
The important part of this PR now works, but there's some annoying inconsistency in how kerchunk writes out |
For reference the reason this test fails is that
Notice that for the variable |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #73 +/- ##
==========================================
+ Coverage 90.18% 90.49% +0.31%
==========================================
Files 14 15 +1
Lines 998 1021 +23
==========================================
+ Hits 900 924 +24
+ Misses 98 97 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Whilst this PR now passes for "inlining" the The The |
virtualizarr/kerchunk.py
Outdated
# TODO can this be generalized to save individual chunks of a dask array? | ||
arr_refs = {'0': inlined_data} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would be cool because we could apply the encoding to every block in parallel (using map_blocks
with #39), and that would allow the user to choose their chunking in the kerchunk output just by rechunking this variable using xarray before serializing it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also doing this for only some of the chunks would effectively implement case (2) of #62.
So if I simply pass |
https://fsspec.github.io/kerchunk/reference.html#kerchunk.combine.MultiZarrToZarr
|
I have no idea what this is:
Given that the tests all pass for me locally |
So right now I can successfully inline (i.e. match kerchunk) the So I've parametrized the test to show what works and xfailed the ones that don't. I'm also now raising |
@norlandrhagen do you have any idea what this error is? Or even how I might try to reproduce it locally?
|
@martindurant I'm seeing an error in a call to EDIT: Nevermind @norlandrhagen came to my rescue! ❤️ |
Would close case (1) of #62.
After #69 was merged, the next step (this PR) is to write loaded numpy arrays into the kerchunk references "inlined".