-
Notifications
You must be signed in to change notification settings - Fork 19
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
Add example for xarray groupby reduction causing memory pressure #1528
Conversation
Co-authored-by: Florian Jetter <[email protected]>
clim = arr.groupby("day").mean(dim="time") | ||
anom = arr.groupby("day") - clim | ||
anom_mean = anom.mean(dim="time") | ||
with xarray.set_options(use_flox=False): |
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.
I'd suggest moving the xarray-related tests to test_xarray.py
.
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.
I'd rather do this as a follow up, but the general idea is good
tests/benchmarks/test_xarray.py
Outdated
], | ||
) | ||
def test_xarray_groupby_reduction(group_reduction_client, func): | ||
pytest.importorskip("xarray") |
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.
Let's move these to the top of the module. There's no need to spin up clusters if we don't have xarray installed.
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.
done
Co-authored-by: Hendrik Makait <[email protected]>
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.
Thanks, @phofl!
each query runs around 50s, we are fine with spot-with-fallback since we mostly care about memory pressure