-
Notifications
You must be signed in to change notification settings - Fork 11
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
Gb/bc debug #232
Gb/bc debug #232
Conversation
…thout pre loading of data
…dataset() which will default to a dask array manager if chunks is specified and load into memory as numpy arrays in chunks is None.
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 reverted the last commit in the chunks=None PR so feel free to merge that in. After that this all looks good to me.
@@ -232,7 +232,7 @@ def pre_load(self): | |||
recommended to improve performance with the new sup3r data handler | |||
access patterns""" | |||
super().pre_load() | |||
if hasattr(self.bias_fut_dh.data, 'compute'): | |||
if hasattr(self.bias_fut_dh, 'compute'): |
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.
Needing to account for the rex handlers not having a data attribute is another reason to default to using the Loaders eventually. This will also allow us to remove the pre load methods that just check if theres a compute method or not (aka rex handler or sup3r handler)
|
||
|
||
@pytest.mark.parametrize('compute', (False, True)) | ||
def test_sup3rdataset_slicing(compute): |
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.
good test, thanks!
>>> xds = xr.Dataset(...) | ||
>>> ds = Sup3rDataset(hourly=xds) | ||
>>> ds.hourly # returns Sup3rX object | ||
>>> ds[feature] # returns a single dataarray |
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.
Good additions. The Sup3rX vs Sup3rDataset stuff is the most complicated part of the refactor imo but looks like it didn't take too long to figure out.
Bnb/compute on none chunks
No description provided.