-
Notifications
You must be signed in to change notification settings - Fork 915
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
Refactor Frame reductions #8944
Refactor Frame reductions #8944
Conversation
This reverts commit 61f09eb36445beabc7a01dc065cb9c2666e8ee3c.
…me any/all and clean up Series any/all implementations.
This reverts commit 034036fdc371576d8be1d7e49b753525fe1fc943.
EDIT 8/4: I had originally posted these benchmarks backwards, my mistake. Benchmarks before
Benchmarks after
|
@shwina my bad, I had posted the benchmarks backwards :) |
Codecov Report
@@ Coverage Diff @@
## branch-21.10 #8944 +/- ##
===============================================
Coverage ? 10.60%
===============================================
Files ? 116
Lines ? 19003
Branches ? 0
===============================================
Hits ? 2015
Misses ? 16988
Partials ? 0 Continue to review full report at Codecov.
|
hmm, apparently I'm not a python codeowner anymore? |
@shwina I just pushed changes to add tests of index reductions again. Regarding the other change (removing a NotImplementedError), I don't think that's a breaking change because it takes a case that failed before (was marked as unsupported even though it should be supported) and lets it function as expected. |
@gpucibot merge |
This PR moves implementations of reductions out of the `Series`/`DataFrame` classes and into `Frame`. The resulting reduction code is implemented in terms of columns, which improves the performance of `DataFrame` reductions, and using a single code path makes it easier to maintain. The `median` and `sum_of_squares` reductions, which were previously only available for `Series`, are now transparently enabled for `DataFrame` as well. This PR also explicitly disables reductions for Index objects to match pandas Index APIs. Since a few reductions had previously been implemented, removing these features constitutes a breaking change. Authors: - Vyas Ramasubramani (https://github.com/vyasr) Approvers: - Keith Kraus (https://github.com/kkraus14) - Ashwin Srinath (https://github.com/shwina) URL: rapidsai#8944
This PR rewrites DataFrame's `kurtosis` and `skew` to use the `_reduce` method introduced in #8944, and it inlines the logic for the `count` to bypass the `_apply_support_method` machinery. This allows us to remove most of that logic entirely aside from the code for row-wise reductions and scans that dispatches to `cupy`. Authors: - Vyas Ramasubramani (https://github.com/vyasr) Approvers: - Charles Blackmon-Luca (https://github.com/charlesbluca) URL: #9068
This PR moves implementations of reductions out of the
Series
/DataFrame
classes and intoFrame
. The resulting reduction code is implemented in terms of columns, which improves the performance ofDataFrame
reductions, and using a single code path makes it easier to maintain. Themedian
andsum_of_squares
reductions, which were previously only available forSeries
, are now transparently enabled forDataFrame
as well.This PR also explicitly disables reductions for Index objects to match pandas Index APIs. Since a few reductions had previously been implemented, removing these features constitutes a breaking change.