-
Notifications
You must be signed in to change notification settings - Fork 54
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
Dynamic chunking interface for StoreToZarr #595
Conversation
@jbusecke per your suggestion, changed this so the |
@jbusecke could I get your help testing this on https://github.com/leap-stc/cmip6-leap-feedstock? I just started trying to do that myself, but realized I didn't understand how the recipe works there. |
Its on my list for sure! Just very busy these last few days with other stuff. Ill try to prioritize it in the next two weeks? |
@jbusecke I'm guessing life hasn't gotten any less busy, am I right? 😬 |
@cisaacstern thanks for the update! I saw @jbusecke has an autoreply on his email that says the next two weeks are devoted to pangeo-forge, so good luck and thanks for your great work! |
This looks awesome. I added an integration test to make sure that the chunking function does serialize properly within beam. It passes for me locally! |
…forge/pangeo-forge-recipes into dynamic-chunks-interface
for more information, see https://pre-commit.ci
…forge/pangeo-forge-recipes into dynamic-chunks-interface
Ok so I think this works, but there is an issue with I have done an A/B test modfing the
This fails with
indicating that the Something that seems weird to me in general here is that the |
for more information, see https://pre-commit.ci
https://pypi.org/project/dynamic-chunks/ Working on implementing this with the the new plugin here. |
@cisaacstern your call if we should wait on |
As far as I can tell, Edit: as a general rule, I'd recommend installing the thing that's being tested last |
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.
Looking great! One testing nit, otherwise LGTM!
ds = xr.open_dataset(store, engine="zarr", chunks={}) | ||
assert ds.title == ( | ||
"Global Precipitation Climatatology Project (GPCP) " "Climate Data Record (CDR), Daily V1.3" | ||
) |
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.
@jbusecke let's assert that the chunking of the opened dataset is in fact what we set dynamically in with the dynamic chunking function :)
for more information, see https://pre-commit.ci
…forge/pangeo-forge-recipes into dynamic-chunks-interface
for more information, see https://pre-commit.ci
…forge/pangeo-forge-recipes into dynamic-chunks-interface
for more information, see https://pre-commit.ci
…forge/pangeo-forge-recipes into dynamic-chunks-interface
@keewis that is actually super helpful. I was not aware of that!
Good rule to live by! |
Closes #572
Supersedes #546
@jbusecke, can you test drive this? You should be able to repurpose your work in #546 as follows:
In order to import
dynamic_target_chunks_from_schema
from a local module, you would need pangeo-forge/pangeo-forge-runner#92 (feel free to work on that! 😄 ). Alternatively, you could:dynamic_target_chunks_from_schema
at the top of your recipe moduledynamic_target_chunks_from_schema
on PyPI and add it to requirements.txtdynamic_target_chunks_from_schema
to GitHub and install in in requirements.txt withgit+...
. This seems like the best short-term compromise between effort + effectiveness.