issue_comments
22 rows where author_association = "MEMBER" and issue = 978356586 sorted by updated_at descending
This data as json, CSV (advanced)
Suggested facets: reactions, created_at (date), updated_at (date)
issue 1
- Enable `flox` in `GroupBy` and `resample` · 22 ✖
id | html_url | issue_url | node_id | user | created_at | updated_at ▲ | author_association | body | reactions | performed_via_github_app | issue |
---|---|---|---|---|---|---|---|---|---|---|---|
1126851894 | https://github.com/pydata/xarray/pull/5734#issuecomment-1126851894 | https://api.github.com/repos/pydata/xarray/issues/5734 | IC_kwDOAMm_X85DKmU2 | max-sixty 5635139 | 2022-05-15T03:30:12Z | 2022-05-15T03:33:49Z | MEMBER | Congratulations @dcherian & @Illviljan & [edit] @andersy005 !!! |
{ "total_count": 1, "+1": 0, "-1": 0, "laugh": 0, "hooray": 1, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Enable `flox` in `GroupBy` and `resample` 978356586 | |
1126852038 | https://github.com/pydata/xarray/pull/5734#issuecomment-1126852038 | https://api.github.com/repos/pydata/xarray/issues/5734 | IC_kwDOAMm_X85DKmXG | dcherian 2448579 | 2022-05-15T03:31:50Z | 2022-05-15T03:31:50Z | MEMBER | and @andersy005 ! |
{ "total_count": 1, "+1": 1, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Enable `flox` in `GroupBy` and `resample` 978356586 | |
1126255398 | https://github.com/pydata/xarray/pull/5734#issuecomment-1126255398 | https://api.github.com/repos/pydata/xarray/issues/5734 | IC_kwDOAMm_X85DIUsm | shoyer 1217238 | 2022-05-13T16:51:24Z | 2022-05-13T16:51:24Z | MEMBER | 👍 this looks great to me! |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Enable `flox` in `GroupBy` and `resample` 978356586 | |
1125236627 | https://github.com/pydata/xarray/pull/5734#issuecomment-1125236627 | https://api.github.com/repos/pydata/xarray/issues/5734 | IC_kwDOAMm_X85DEb-T | dcherian 2448579 | 2022-05-12T17:14:13Z | 2022-05-12T17:14:13Z | MEMBER |
Unfortunately the optimal method depends on distribution of group labels across chunks, so a global option doesn't make sense. It would make sense to create a |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Enable `flox` in `GroupBy` and `resample` 978356586 | |
1124194834 | https://github.com/pydata/xarray/pull/5734#issuecomment-1124194834 | https://api.github.com/repos/pydata/xarray/issues/5734 | IC_kwDOAMm_X85DAdoS | dcherian 2448579 | 2022-05-11T19:14:24Z | 2022-05-11T19:15:44Z | MEMBER | Thanks for testing it out! I was going to ping xclim when this finally got merged. Presumably you haven't found any bugs? You can pass We could actually consider adding For resampling-type, we are using cohorts by default which generalizes to blockwise when applicable but is slower at graph-construction time. Note you can only blockwise if all members of a group are in a single block. So if you are resampling to yearly but a year of data occupies multiple chunks, you want "cohorts", not "blockwise". |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Enable `flox` in `GroupBy` and `resample` 978356586 | |
1122662880 | https://github.com/pydata/xarray/pull/5734#issuecomment-1122662880 | https://api.github.com/repos/pydata/xarray/issues/5734 | IC_kwDOAMm_X85C6nng | Illviljan 14371165 | 2022-05-10T17:15:46Z | 2022-05-10T17:15:46Z | MEMBER | Yay, mypy is passing now after flox updates. :) |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Enable `flox` in `GroupBy` and `resample` 978356586 | |
1119072230 | https://github.com/pydata/xarray/pull/5734#issuecomment-1119072230 | https://api.github.com/repos/pydata/xarray/issues/5734 | IC_kwDOAMm_X85Cs6_m | Illviljan 14371165 | 2022-05-05T21:40:36Z | 2022-05-05T21:40:36Z | MEMBER | Copy/pasteing the Resample-class removes the rest of the errors. Not especially elegant though, maybe there's a better way?
```
xarray/core/dask_array_compat.py:8: error: Incompatible types in assignment (expression has type "None", variable has type Module) [assignment]
xarray/backends/locks.py:10: error: Cannot assign to a type [misc]
xarray/backends/locks.py:10: error: Incompatible types in assignment (expression has type "Type[Lock]", variable has type "Type[SerializableLock]") [assignment]
Installing missing stub packages:
xarray/backends/locks.py:15: error: Cannot assign to a type [misc]
/usr/share/miniconda/envs/xarray-tests/bin/python -m pip install types-PyYAML types-paramiko types-python-dateutil types-pytz types-setuptools
xarray/backends/locks.py:15: error: Incompatible types in assignment (expression has type "None", variable has type "Type[Lock]") [assignment]
xarray/core/types.py:19: error: Cannot assign to a type [misc]
xarray/core/types.py:19: error: Incompatible types in assignment (expression has type "Type[ndarray[Any, Any]]", variable has type "Type[Array]") [assignment]
Found 25 errors in 14 files (checked 140 source files)
xarray/core/duck_array_ops.py:33: error: Incompatible types in assignment (expression has type "None", variable has type Module) [assignment]
xarray/core/nanops.py:14: error: Incompatible types in assignment (expression has type "None", variable has type Module) [assignment]
xarray/core/_reductions.py:15: error: Skipping analyzing "flox": module is installed, but missing library stubs or py.typed marker [import]
xarray/core/_reductions.py:15: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
xarray/core/groupby.py:584: error: Skipping analyzing "flox.xarray": module is installed, but missing library stubs or py.typed marker [import]
xarray/core/dataset.py:113: error: Cannot assign to a type [misc]
xarray/core/dataset.py:113: error: Incompatible types in assignment (expression has type "None", variable has type "Type[Delayed]") [assignment]
xarray/core/dataset.py:1761: error: Incompatible return value type (got "Union[Tuple[ArrayWriter, AbstractDataStore], bytes, Delayed, None]", expected "Union[bytes, Delayed, None]") [return-value]
xarray/core/dataarray.py:70: error: Cannot assign to a type [misc]
xarray/core/dataarray.py:70: error: Incompatible types in assignment (expression has type "None", variable has type "Type[Delayed]") [assignment]
xarray/core/computation.py:1864: error: Overloaded function implementation cannot satisfy signature 2 due to inconsistencies in how they use type variables [misc]
xarray/core/computation.py:1864: error: Overloaded function implementation cannot satisfy signature 3 due to inconsistencies in how they use type variables [misc]
xarray/core/_typed_ops.pyi:24: error: Cannot assign to a type [misc]
xarray/core/_typed_ops.pyi:24: error: Incompatible types in assignment (expression has type "Type[ndarray[Any, Any]]", variable has type "Type[Array]") [assignment]
xarray/backends/api.py:38: error: Cannot assign to a type [misc]
xarray/backends/api.py:38: error: Incompatible types in assignment (expression has type "None", variable has type "Type[Delayed]") [assignment]
xarray/tests/test_computation.py:2019: error: No overload variant of "polyval" matches argument types "Any", "Any" [call-overload]
xarray/tests/test_computation.py:2019: note: Possible overload variants:
xarray/tests/test_computation.py:2019: note: def polyval(coord: DataArray, coeffs: DataArray, degree_dim: Hashable) -> DataArray
xarray/tests/test_computation.py:2019: note: def [T_Xarray in (DataArray, Dataset)] polyval(coord: T_Xarray, coeffs: Dataset, degree_dim: Hashable) -> Dataset
xarray/tests/test_computation.py:2019: note: def [T_Xarray in (DataArray, Dataset)] polyval(coord: Dataset, coeffs: T_Xarray, degree_dim: Hashable) -> Dataset
xarray/tests/test_testing.py:13: error: Cannot infer type of lambda [misc]
xarray/tests/test_testing.py:13: error: Incompatible types in assignment (expression has type "Callable[[Any], Any]", variable has type "Callable[[Any, Any, Any, Any, Any, Any, Any, Any, Any], Any]") [assignment]
```
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Enable `flox` in `GroupBy` and `resample` 978356586 | |
1119043959 | https://github.com/pydata/xarray/pull/5734#issuecomment-1119043959 | https://api.github.com/repos/pydata/xarray/issues/5734 | IC_kwDOAMm_X85Cs0F3 | Illviljan 14371165 | 2022-05-05T21:03:37Z | 2022-05-05T21:03:37Z | MEMBER | Ok, this kind of works. But there's a new error because I defined the Data*ResampleBase-classes with a for-loop.
```
Found 32 errors in 15 files (checked 140 source files)
xarray/backends/locks.py:10: error: Incompatible types in assignment (expression has type "Type[Lock]", variable has type "Type[SerializableLock]") [assignment]
xarray/backends/locks.py:15: error: Cannot assign to a type [misc]
xarray/backends/locks.py:15: error: Incompatible types in assignment (expression has type "None", variable has type "Type[Lock]") [assignment]
xarray/core/types.py:19: error: Cannot assign to a type [misc]
xarray/core/types.py:19: error: Incompatible types in assignment (expression has type "Type[ndarray[Any, Any]]", variable has type "Type[Array]") [assignment]
xarray/core/duck_array_ops.py:33: error: Incompatible types in assignment (expression has type "None", variable has type Module) [assignment]
xarray/core/nanops.py:14: error: Incompatible types in assignment (expression has type "None", variable has type Module) [assignment]
xarray/core/_reductions.py:15: error: Skipping analyzing "flox": module is installed, but missing library stubs or py.typed marker [import]
xarray/core/_reductions.py:15: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
xarray/core/groupby.py:584: error: Skipping analyzing "flox.xarray": module is installed, but missing library stubs or py.typed marker [import]
xarray/core/dataset.py:113: error: Cannot assign to a type [misc]
xarray/core/dataset.py:113: error: Incompatible types in assignment (expression has type "None", variable has type "Type[Delayed]") [assignment]
xarray/core/dataset.py:1761: error: Incompatible return value type (got "Union[Tuple[ArrayWriter, AbstractDataStore], bytes, Delayed, None]", expected "Union[bytes, Delayed, None]") [return-value]
xarray/core/dataarray.py:70: error: Cannot assign to a type [misc]
xarray/core/dataarray.py:70: error: Incompatible types in assignment (expression has type "None", variable has type "Type[Delayed]") [assignment]
xarray/core/computation.py:1864: error: Overloaded function implementation cannot satisfy signature 2 due to inconsistencies in how they use type variables [misc]
xarray/core/computation.py:1864: error: Overloaded function implementation cannot satisfy signature 3 due to inconsistencies in how they use type variables [misc]
xarray/core/_typed_ops.pyi:24: error: Cannot assign to a type [misc]
xarray/core/_typed_ops.pyi:24: error: Incompatible types in assignment (expression has type "Type[ndarray[Any, Any]]", variable has type "Type[Array]") [assignment]
xarray/core/resample.py:14: error: Variable "xarray.core.resample.GroupByBase" is not valid as a type [valid-type]
xarray/core/resample.py:14: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
xarray/core/resample.py:14: error: Invalid base class "GroupByBase" [misc]
xarray/core/resample.py:189: error: No overload variant of "__setitem__" of "list" matches argument types "int", "Type[_Resample]" [call-overload]
xarray/core/resample.py:189: note: Possible overload variants:
xarray/core/resample.py:189: note: def __setitem__(self, SupportsIndex, None) -> None
xarray/core/resample.py:189: note: def __setitem__(self, slice, Iterable[None]) -> None
xarray/core/resample.py:194: error: Variable "xarray.core.resample.DataArrayResampleBase" is not valid as a type [valid-type]
xarray/core/resample.py:194: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
xarray/core/resample.py:194: error: Invalid base class "DataArrayResampleBase" [misc]
xarray/core/resample.py:285: error: Variable "xarray.core.resample.DatasetResampleBase" is not valid as a type [valid-type]
xarray/core/resample.py:285: note: See https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
xarray/core/resample.py:285: error: Invalid base class "DatasetResampleBase" [misc]
xarray/backends/api.py:38: error: Cannot assign to a type [misc]
xarray/backends/api.py:38: error: Incompatible types in assignment (expression has type "None", variable has type "Type[Delayed]") [assignment]
xarray/tests/test_computation.py:2019: error: No overload variant of "polyval" matches argument types "Any", "Any" [call-overload]
xarray/tests/test_computation.py:2019: note: Possible overload variants:
xarray/tests/test_computation.py:2019: note: def polyval(coord: DataArray, coeffs: DataArray, degree_dim: Hashable) -> DataArray
xarray/tests/test_computation.py:2019: note: def [T_Xarray in (DataArray, Dataset)] polyval(coord: T_Xarray, coeffs: Dataset, degree_dim: Hashable) -> Dataset
xarray/tests/test_computation.py:2019: note: def [T_Xarray in (DataArray, Dataset)] polyval(coord: Dataset, coeffs: T_Xarray, degree_dim: Hashable) -> Dataset
xarray/tests/test_testing.py:13: error: Cannot infer type of lambda [misc]
xarray/tests/test_testing.py:13: error: Incompatible types in assignment (expression has type "Callable[[Any], Any]", variable has type "Callable[[Any, Any, Any, Any, Any, Any, Any, Any, Any], Any]") [assignment]
```
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Enable `flox` in `GroupBy` and `resample` 978356586 | |
1117613319 | https://github.com/pydata/xarray/pull/5734#issuecomment-1117613319 | https://api.github.com/repos/pydata/xarray/issues/5734 | IC_kwDOAMm_X85CnW0H | dcherian 2448579 | 2022-05-04T17:26:08Z | 2022-05-04T17:26:08Z | MEMBER | Thanks @Illviljan I'm having trouble getting the inheritance order right and keeping mypy happy. Help is very welcome! |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Enable `flox` in `GroupBy` and `resample` 978356586 | |
1117586922 | https://github.com/pydata/xarray/pull/5734#issuecomment-1117586922 | https://api.github.com/repos/pydata/xarray/issues/5734 | IC_kwDOAMm_X85CnQXq | Illviljan 14371165 | 2022-05-04T16:57:40Z | 2022-05-04T16:57:40Z | MEMBER | There's a bit of mypy errors now. Maybe just removíng
```
Successfully installed types-PyYAML-6.0.7 types-cryptography-3.3.21 types-paramiko-2.10.0 types-python-dateutil-2.8.14 types-pytz-2021.3.7 types-setuptools-57.4.14
xarray/backends/locks.py:10: error: Cannot assign to a type [misc]
xarray/backends/locks.py:10: error: Incompatible types in assignment (expression has type "Type[Lock]", variable has type "Type[SerializableLock]") [assignment]
xarray/backends/locks.py:15: error: Cannot assign to a type [misc]
xarray/backends/locks.py:15: error: Incompatible types in assignment (expression has type "None", variable has type "Type[Lock]") [assignment]
xarray/core/types.py:19: error: Cannot assign to a type [misc]
xarray/core/types.py:19: error: Incompatible types in assignment (expression has type "Type[ndarray[Any, Any]]", variable has type "Type[Array]") [assignment]
xarray/core/dask_array_compat.py:11: error: Incompatible types in assignment (expression has type "None", variable has type Module) [assignment]
xarray/core/duck_array_ops.py:33: error: Incompatible types in assignment (expression has type "None", variable has type Module) [assignment]
xarray/core/nanops.py:14: error: Incompatible types in assignment (expression has type "None", variable has type Module) [assignment]
xarray/core/_reductions.py:15: error: Skipping analyzing "flox": module is installed, but missing library stubs or py.typed marker [import]
xarray/core/_reductions.py:15: note: See https://mypy.readthedocs.io/en/stable/running_mypy.html#missing-imports
xarray/core/_reductions.py:3194: error: "DatasetResampleReductions" has no attribute "_flox_reduce" [attr-defined]
xarray/core/_reductions.py:3203: error: "DatasetResampleReductions" has no attribute "reduce" [attr-defined]
xarray/core/_reductions.py:3278: error: "DatasetResampleReductions" has no attribute "_flox_reduce" [attr-defined]
xarray/core/_reductions.py:3287: error: "DatasetResampleReductions" has no attribute "reduce" [attr-defined]
xarray/core/_reductions.py:3362: error: "DatasetResampleReductions" has no attribute "_flox_reduce" [attr-defined]
xarray/core/_reductions.py:3371: error: "DatasetResampleReductions" has no attribute "reduce" [attr-defined]
xarray/core/_reductions.py:3462: error: "DatasetResampleReductions" has no attribute "_flox_reduce" [attr-defined]
xarray/core/_reductions.py:3472: error: "DatasetResampleReductions" has no attribute "reduce" [attr-defined]
xarray/core/_reductions.py:3564: error: "DatasetResampleReductions" has no attribute "_flox_reduce" [attr-defined]
xarray/core/_reductions.py:3574: error: "DatasetResampleReductions" has no attribute "reduce" [attr-defined]
xarray/core/_reductions.py:3670: error: "DatasetResampleReductions" has no attribute "_flox_reduce" [attr-defined]
xarray/core/_reductions.py:3680: error: "DatasetResampleReductions" has no attribute "reduce" [attr-defined]
xarray/core/_reductions.py:3793: error: "DatasetResampleReductions" has no attribute "_flox_reduce" [attr-defined]
xarray/core/_reductions.py:3804: error: "DatasetResampleReductions" has no attribute "reduce" [attr-defined]
xarray/core/_reductions.py:3918: error: "DatasetResampleReductions" has no attribute "_flox_reduce" [attr-defined]
xarray/core/_reductions.py:3929: error: "DatasetResampleReductions" has no attribute "reduce" [attr-defined]
xarray/core/_reductions.py:4040: error: "DatasetResampleReductions" has no attribute "_flox_reduce" [attr-defined]
xarray/core/_reductions.py:4051: error: "DatasetResampleReductions" has no attribute "reduce" [attr-defined]
xarray/core/_reductions.py:4162: error: "DatasetResampleReductions" has no attribute "_flox_reduce" [attr-defined]
xarray/core/_reductions.py:4173: error: "DatasetResampleReductions" has no attribute "reduce" [attr-defined]
xarray/core/_reductions.py:4269: error: "DatasetResampleReductions" has no attribute "reduce" [attr-defined]
xarray/core/_reductions.py:5418: error: "DataArrayResampleReductions" has no attribute "_flox_reduce" [attr-defined]
xarray/core/_reductions.py:5426: error: "DataArrayResampleReductions" has no attribute "reduce" [attr-defined]
xarray/core/_reductions.py:5495: error: "DataArrayResampleReductions" has no attribute "_flox_reduce" [attr-defined]
xarray/core/_reductions.py:5503: error: "DataArrayResampleReductions" has no attribute "reduce" [attr-defined]
xarray/core/_reductions.py:5572: error: "DataArrayResampleReductions" has no attribute "_flox_reduce" [attr-defined]
xarray/core/_reductions.py:5580: error: "DataArrayResampleReductions" has no attribute "reduce" [attr-defined]
xarray/core/_reductions.py:5663: error: "DataArrayResampleReductions" has no attribute "_flox_reduce" [attr-defined]
xarray/core/_reductions.py:5672: error: "DataArrayResampleReductions" has no attribute "reduce" [attr-defined]
xarray/core/_reductions.py:5756: error: "DataArrayResampleReductions" has no attribute "_flox_reduce" [attr-defined]
xarray/core/_reductions.py:5765: error: "DataArrayResampleReductions" has no attribute "reduce" [attr-defined]
xarray/core/_reductions.py:5853: error: "DataArrayResampleReductions" has no attribute "_flox_reduce" [attr-defined]
xarray/core/_reductions.py:5862: error: "DataArrayResampleReductions" has no attribute "reduce" [attr-defined]
xarray/core/_reductions.py:5965: error: "DataArrayResampleReductions" has no attribute "_flox_reduce" [attr-defined]
xarray/core/_reductions.py:5975: error: "DataArrayResampleReductions" has no attribute "reduce" [attr-defined]
xarray/core/_reductions.py:6079: error: "DataArrayResampleReductions" has no attribute "_flox_reduce" [attr-defined]
xarray/core/_reductions.py:6089: error: "DataArrayResampleReductions" has no attribute "reduce" [attr-defined]
xarray/core/_reductions.py:6190: error: "DataArrayResampleReductions" has no attribute "_flox_reduce" [attr-defined]
xarray/core/_reductions.py:6200: error: "DataArrayResampleReductions" has no attribute "reduce" [attr-defined]
xarray/core/_reductions.py:6301: error: "DataArrayResampleReductions" has no attribute "_flox_reduce" [attr-defined]
xarray/core/_reductions.py:6311: error: "DataArrayResampleReductions" has no attribute "reduce" [attr-defined]
xarray/core/_reductions.py:6399: error: "DataArrayResampleReductions" has no attribute "reduce" [attr-defined]
xarray/core/groupby.py:584: error: Skipping analyzing "flox.xarray": module is installed, but missing library stubs or py.typed marker [import]
xarray/core/dataset.py:113: error: Cannot assign to a type [misc]
xarray/core/dataset.py:113: error: Incompatible types in assignment (expression has type "None", variable has type "Type[Delayed]") [assignment]
xarray/core/dataset.py:1761: error: Incompatible return value type (got "Union[Tuple[ArrayWriter, AbstractDataStore], bytes, Delayed, None]", expected "Union[bytes, Delayed, None]") [return-value]
xarray/core/dataarray.py:70: error: Cannot assign to a type [misc]
xarray/core/dataarray.py:70: error: Incompatible types in assignment (expression has type "None", variable has type "Type[Delayed]") [assignment]
xarray/core/_typed_ops.pyi:24: error: Cannot assign to a type [misc]
xarray/core/_typed_ops.pyi:24: error: Incompatible types in assignment (expression has type "Type[ndarray[Any, Any]]", variable has type "Type[Array]") [assignment]
xarray/backends/api.py:38: error: Cannot assign to a type [misc]
xarray/backends/api.py:38: error: Incompatible types in assignment (expression has type "None", variable has type "Type[Delayed]") [assignment]
xarray/tests/test_testing.py:13: error: Cannot infer type of lambda [misc]
xarray/tests/test_testing.py:13: error: Incompatible types in assignment (expression has type "Callable[[Any], Any]", variable has type "Callable[[Any, Any, Any, Any, Any, Any, Any, Any, Any], Any]") [assignment]
Installing missing stub packages:
/usr/share/miniconda/envs/xarray-tests/bin/python -m pip install types-PyYAML types-paramiko types-python-dateutil types-pytz types-setuptools
```
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Enable `flox` in `GroupBy` and `resample` 978356586 | |
1117497457 | https://github.com/pydata/xarray/pull/5734#issuecomment-1117497457 | https://api.github.com/repos/pydata/xarray/issues/5734 | IC_kwDOAMm_X85Cm6hx | dcherian 2448579 | 2022-05-04T15:33:30Z | 2022-05-04T15:34:06Z | MEMBER | @pydata/xarray This is ready to go. It's mostly one adaptor function and a lot of new tests. It does need docs, I can add that in a future PR. By default, we use a strategy ("split-reduce") that is very similar to our current one with dask arrays, so users will have to explicitly choose a new strategy to see much improvements. For resampling we can choose a sensible default that should show only improvements, and no regressions ("cohorts") |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Enable `flox` in `GroupBy` and `resample` 978356586 | |
1092097037 | https://github.com/pydata/xarray/pull/5734#issuecomment-1092097037 | https://api.github.com/repos/pydata/xarray/issues/5734 | IC_kwDOAMm_X85BGBQN | dcherian 2448579 | 2022-04-07T19:00:28Z | 2022-04-07T19:00:28Z | MEMBER | @pydata/xarray this is blocked by https://github.com/pydata/xarray/issues/6430 but is ready for review. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Enable `flox` in `GroupBy` and `resample` 978356586 | |
1012599465 | https://github.com/pydata/xarray/pull/5734#issuecomment-1012599465 | https://api.github.com/repos/pydata/xarray/issues/5734 | IC_kwDOAMm_X848Wwqp | Illviljan 14371165 | 2022-01-13T23:06:43Z | 2022-01-13T23:10:12Z | MEMBER | This is a strict improvement now, well done!
Earlier benchmarks:
```
before after ratio
[5d30f96e] [0ad0dfde]
- 16.7±0.3ms 10.3±0.5ms 0.62 groupby.GroupByDask.time_agg_small_num_groups('sum', 2)
- 21.5±0.8ms 13.1±0.5ms 0.61 groupby.ResampleDask.time_agg_small_num_groups('mean', 1)
- 24.5±1ms 14.4±0.8ms 0.59 groupby.ResampleDask.time_agg_small_num_groups('mean', 2)
- 12.8±0.6ms 7.08±0.3ms 0.55 groupby.GroupByDask.time_agg_small_num_groups('sum', 1)
- 28.9±0.9ms 13.2±0.4ms 0.46 groupby.ResampleDask.time_agg_small_num_groups('sum', 1)
- 31.5±0.5ms 14.2±1ms 0.45 groupby.ResampleDask.time_agg_small_num_groups('sum', 2)
- 110±4ms 10.6±0.4ms 0.10 groupby.Resample.time_agg_large_num_groups('sum', 2)
- 96.2±5ms 8.80±0.4ms 0.09 groupby.Resample.time_agg_large_num_groups('mean', 1)
- 127±3ms 10.9±0.6ms 0.09 groupby.Resample.time_agg_large_num_groups('mean', 2)
- 95.9±2ms 7.44±0.4ms 0.08 groupby.Resample.time_agg_large_num_groups('sum', 1)
- 211±6ms 9.99±0.4ms 0.05 groupby.GroupBy.time_agg_large_num_groups('mean', 2)
- 219±8ms 10.4±1ms 0.05 groupby.GroupBy.time_agg_large_num_groups('sum', 2)
- 154±3ms 6.86±0.4ms 0.04 groupby.GroupBy.time_agg_large_num_groups('mean', 1)
- 163±3ms 6.83±0.2ms 0.04 groupby.GroupBy.time_agg_large_num_groups('sum', 1)
- 330±3ms 10.6±0.6ms 0.03 groupby.GroupByDask.time_agg_large_num_groups('mean', 2)
- 446±10ms 14.2±0.3ms 0.03 groupby.ResampleDask.time_agg_large_num_groups('mean', 2)
- 413±9ms 12.1±0.5ms 0.03 groupby.ResampleDask.time_agg_large_num_groups('mean', 1)
- 265±2ms 7.52±0.2ms 0.03 groupby.GroupByDask.time_agg_large_num_groups('mean', 1)
- 469±10ms 10.3±0.5ms 0.02 groupby.GroupByDask.time_agg_large_num_groups('sum', 2)
- 739±10ms 14.0±0.8ms 0.02 groupby.ResampleDask.time_agg_large_num_groups('sum', 2)
- 678±10ms 12.0±1ms 0.02 groupby.ResampleDask.time_agg_large_num_groups('sum', 1)
- 434±20ms 7.05±0.5ms 0.02 groupby.GroupByDask.time_agg_large_num_groups('sum', 1)
before after ratio
[5d30f96e] [0ad0dfde]
+ 3.89±0.1ms 6.62±0.4ms 1.70 groupby.GroupBy.time_agg_small_num_groups('sum', 1)
```
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Enable `flox` in `GroupBy` and `resample` 978356586 | |
966624963 | https://github.com/pydata/xarray/pull/5734#issuecomment-966624963 | https://api.github.com/repos/pydata/xarray/issues/5734 | IC_kwDOAMm_X845nYbD | dcherian 2448579 | 2021-11-11T21:05:54Z | 2021-11-11T21:05:54Z | MEMBER | This builds on #5950 so that should be reviewed and merged first. |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Enable `flox` in `GroupBy` and `resample` 978356586 | |
933160264 | https://github.com/pydata/xarray/pull/5734#issuecomment-933160264 | https://api.github.com/repos/pydata/xarray/issues/5734 | IC_kwDOAMm_X843nuVI | dcherian 2448579 | 2021-10-04T05:42:51Z | 2021-11-11T20:58:53Z | MEMBER | !!! The only failures are in
I like @max-sixty's suggestion of generating the reductions like |
{ "total_count": 1, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 1, "rocket": 0, "eyes": 0 } |
Enable `flox` in `GroupBy` and `resample` 978356586 | |
965574480 | https://github.com/pydata/xarray/pull/5734#issuecomment-965574480 | https://api.github.com/repos/pydata/xarray/issues/5734 | IC_kwDOAMm_X845jX9Q | dcherian 2448579 | 2021-11-10T17:31:22Z | 2021-11-10T21:52:17Z | MEMBER | OK CI isn't using the numpy_groupies code path for reasons I don't understand. Does anyone see a reason why this might happen? |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Enable `flox` in `GroupBy` and `resample` 978356586 | |
964409224 | https://github.com/pydata/xarray/pull/5734#issuecomment-964409224 | https://api.github.com/repos/pydata/xarray/issues/5734 | IC_kwDOAMm_X845e7eI | dcherian 2448579 | 2021-11-09T18:14:38Z | 2021-11-09T18:14:38Z | MEMBER | Benchmarks are looking good (npg=True means use numpy groupies). Big gains (10-20x) for large number of groups (100), especially with dask. ```
[ 2.78%] ··· groupby.GroupBy.time_agg_large_num_groups ok
[ 2.78%] ··· ======== ========== =========== ========== ===========
-- ndim / npg [ 5.56%] ··· groupby.GroupBy.time_agg_small_num_groups ok
[ 5.56%] ··· ======== ========== =========== ========== ===========
-- ndim / npg [ 8.33%] ··· groupby.GroupBy.time_init ok
[ 8.33%] ··· ====== ==========
ndim [ 11.11%] ··· groupby.GroupByDask.time_agg_large_num_groups ok
[ 11.11%] ··· ======== ========== =========== ========== ===========
-- ndim / npg [ 13.89%] ··· groupby.GroupByDask.time_agg_small_num_groups ok
[ 13.89%] ··· ======== ========== =========== ========== ===========
-- ndim / npg [ 16.67%] ··· groupby.GroupByDask.time_init ok
[ 16.67%] ··· ====== ==========
ndim
[ 38.89%] ··· groupby.Resample.time_agg_small_num_groups ok
[ 38.89%] ··· ======== ========== =========== ========== ===========
-- ndim / npg [ 41.67%] ··· groupby.Resample.time_init ok
[ 41.67%] ··· ====== ==========
ndim [ 44.44%] ··· groupby.ResampleDask.time_agg_large_num_groups ok
[ 44.44%] ··· ======== ========== =========== ========== ===========
-- ndim / npg [ 47.22%] ··· groupby.ResampleDask.time_agg_small_num_groups ok
[ 47.22%] ··· ======== ========== =========== ========== ===========
-- ndim / npg [ 50.00%] ··· groupby.ResampleDask.time_init ok
[ 50.00%] ··· ====== ==========
ndim |
{ "total_count": 3, "+1": 0, "-1": 0, "laugh": 0, "hooray": 3, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Enable `flox` in `GroupBy` and `resample` 978356586 | |
963568052 | https://github.com/pydata/xarray/pull/5734#issuecomment-963568052 | https://api.github.com/repos/pydata/xarray/issues/5734 | IC_kwDOAMm_X845buG0 | dcherian 2448579 | 2021-11-08T21:00:04Z | 2021-11-08T21:00:04Z | MEMBER |
cc @keewis |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Enable `flox` in `GroupBy` and `resample` 978356586 | |
956492667 | https://github.com/pydata/xarray/pull/5734#issuecomment-956492667 | https://api.github.com/repos/pydata/xarray/issues/5734 | IC_kwDOAMm_X845Aut7 | Illviljan 14371165 | 2021-11-01T18:44:43Z | 2021-11-01T18:44:43Z | MEMBER | Maybe it's also on the ```python import numpy as np import pint import dask.array as da pint crashes:np.asanyarray([1, 2], like=pint.Quantity(1, "s")) Traceback (most recent call last): File "<ipython-input-11-f8c20802ca08>", line 1, in <module> np.asanyarray([1, 2], like=pint.Quantity(1, "s")) TypeError: no implementation found for 'numpy.asanyarray' on types that implement array_function: [<class 'pint.quantity.Quantity'>] dask supports it:np.asanyarray([1, 2], like=da.array(0)) Out[12]: dask.array<array, shape=(2,), dtype=int32, chunksize=(2,), chunktype=numpy.ndarray> ``` |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Enable `flox` in `GroupBy` and `resample` 978356586 | |
954290212 | https://github.com/pydata/xarray/pull/5734#issuecomment-954290212 | https://api.github.com/repos/pydata/xarray/issues/5734 | IC_kwDOAMm_X8444VAk | dcherian 2448579 | 2021-10-28T23:11:08Z | 2021-10-28T23:11:08Z | MEMBER |
yes; this will require upstream changes |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Enable `flox` in `GroupBy` and `resample` 978356586 | |
938906859 | https://github.com/pydata/xarray/pull/5734#issuecomment-938906859 | https://api.github.com/repos/pydata/xarray/issues/5734 | IC_kwDOAMm_X8439pTr | Illviljan 14371165 | 2021-10-08T17:20:48Z | 2021-10-08T17:20:48Z | MEMBER | Looking at those unit errors it appears
```python
____________________ TestDataset.test_resample[int32-data] ____________________
[gw1] win32 -- Python 3.9.7 C:\Miniconda\envs\xarray-tests\python.exe
self = <xarray.tests.test_units.TestDataset object at 0x0000028489DCFC70>
variant = 'data', dtype = dtype('int32')
@pytest.mark.parametrize(
"variant",
(
"data",
pytest.param(
"dims", marks=pytest.mark.skip(reason="indexes don't support units")
),
"coords",
),
)
def test_resample(self, variant, dtype):
# TODO: move this to test_computation_objects
variants = {
"data": ((unit_registry.degK, unit_registry.Pa), 1, 1),
"dims": ((1, 1), unit_registry.m, 1),
"coords": ((1, 1), 1, unit_registry.m),
}
(unit1, unit2), dim_unit, coord_unit = variants.get(variant)
array1 = np.linspace(-5, 5, 10 * 5).reshape(10, 5).astype(dtype) * unit1
array2 = np.linspace(10, 20, 10 * 8).reshape(10, 8).astype(dtype) * unit2
t = pd.date_range("10-09-2010", periods=array1.shape[0], freq="1y")
y = np.arange(5) * dim_unit
z = np.arange(8) * dim_unit
u = np.linspace(-1, 0, 5) * coord_unit
ds = xr.Dataset(
data_vars={"a": (("time", "y"), array1), "b": (("time", "z"), array2)},
coords={"time": t, "y": y, "z": z, "u": ("y", u)},
)
units = extract_units(ds)
func = method("resample", time="6m")
expected = attach_units(func(strip_units(ds)).mean(), units)
> actual = func(ds).mean()
D:\a\xarray\xarray\xarray\tests\test_units.py:5366:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
D:\a\xarray\xarray\xarray\core\groupby.py:602: in wrapped_func
result = xarray_reduce(
C:\Miniconda\envs\xarray-tests\lib\site-packages\dask_groupby\xarray.py:259: in xarray_reduce
actual = xr.apply_ufunc(
D:\a\xarray\xarray\xarray\core\computation.py:1153: in apply_ufunc
return apply_dataset_vfunc(
D:\a\xarray\xarray\xarray\core\computation.py:447: in apply_dataset_vfunc
result_vars = apply_dict_of_variables_vfunc(
D:\a\xarray\xarray\xarray\core\computation.py:391: in apply_dict_of_variables_vfunc
result_vars[name] = func(*variable_args)
D:\a\xarray\xarray\xarray\core\computation.py:733: in apply_variable_ufunc
result_data = func(*input_data)
C:\Miniconda\envs\xarray-tests\lib\site-packages\dask_groupby\xarray.py:232: in wrapper
result, groups = groupby_reduce(*args, **kwargs)
C:\Miniconda\envs\xarray-tests\lib\site-packages\dask_groupby\core.py:1119: in groupby_reduce
results = chunk_reduce(
C:\Miniconda\envs\xarray-tests\lib\site-packages\dask_groupby\core.py:521: in chunk_reduce
result = _get_aggregate(backend)(
C:\Miniconda\envs\xarray-tests\lib\site-packages\numpy_groupies\aggregate_numpy.py:291: in aggregate
return _aggregate_base(group_idx, a, size=size, fill_value=fill_value,
C:\Miniconda\envs\xarray-tests\lib\site-packages\numpy_groupies\aggregate_numpy.py:256: in _aggregate_base
group_idx, a, flat_size, ndim_idx, size = input_validation(group_idx, a,
C:\Miniconda\envs\xarray-tests\lib\site-packages\numpy_groupies\utils_numpy.py:199: in input_validation
a = np.asanyarray(a)
C:\Miniconda\envs\xarray-tests\lib\site-packages\numpy\core\_asarray.py:171: in asanyarray
return array(a, dtype, copy=False, order=order, subok=True)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <Quantity([[-5 -3 -2 -1 0 0 1 2 3 4]
[-4 -3 -2 -1 0 0 1 2 3 4]
[-4 -3 -2 -1 0 0 1 2 3 4]
[-4 -3 -2 -1 0 0 1 2 3 4]
[-4 -3 -2 -1 0 0 1 2 3 5]], 'kelvin')>
t = None
def __array__(self, t=None):
> warnings.warn(
"The unit of the quantity is stripped when downcasting to ndarray.",
UnitStrippedWarning,
stacklevel=2,
)
E pint.errors.UnitStrippedWarning: The unit of the quantity is stripped when downcasting to ndarray.
C:\Miniconda\envs\xarray-tests\lib\site-packages\pint\quantity.py:1700: UnitStrippedWarning
```
|
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Enable `flox` in `GroupBy` and `resample` 978356586 | |
913070347 | https://github.com/pydata/xarray/pull/5734#issuecomment-913070347 | https://api.github.com/repos/pydata/xarray/issues/5734 | IC_kwDOAMm_X842bFkL | dcherian 2448579 | 2021-09-05T01:52:49Z | 2021-09-05T01:52:49Z | MEMBER | We don't have any asv benchmarks for groupby currently. It would be good to add some! |
{ "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
Enable `flox` in `GroupBy` and `resample` 978356586 |
Advanced export
JSON shape: default, array, newline-delimited, object
CREATE TABLE [issue_comments] ( [html_url] TEXT, [issue_url] TEXT, [id] INTEGER PRIMARY KEY, [node_id] TEXT, [user] INTEGER REFERENCES [users]([id]), [created_at] TEXT, [updated_at] TEXT, [author_association] TEXT, [body] TEXT, [reactions] TEXT, [performed_via_github_app] TEXT, [issue] INTEGER REFERENCES [issues]([id]) ); CREATE INDEX [idx_issue_comments_issue] ON [issue_comments] ([issue]); CREATE INDEX [idx_issue_comments_user] ON [issue_comments] ([user]);
user 4