-
Notifications
You must be signed in to change notification settings - Fork 916
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
Support Aggregation
serialization in pylibcudf
#17469
base: branch-25.02
Are you sure you want to change the base?
Changes from all commits
f3d12fe
ce11e16
77be7fb
9007963
31f236e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,6 +48,7 @@ cdef extern from "cudf/aggregation.hpp" namespace "cudf" nogil: | |
CUDA | ||
CORRELATION | ||
COVARIANCE | ||
EWMA | ||
|
||
cdef cppclass aggregation: | ||
Kind kind | ||
|
@@ -70,6 +71,9 @@ cdef extern from "cudf/aggregation.hpp" namespace "cudf" nogil: | |
cdef cppclass scan_aggregation(aggregation): | ||
pass | ||
|
||
cdef cppclass segmented_reduce_aggregation(aggregation): | ||
pass | ||
|
||
cpdef enum class udf_type(bool): | ||
CUDA | ||
PTX | ||
|
@@ -170,3 +174,66 @@ cdef extern from "cudf/aggregation.hpp" namespace "cudf" nogil: | |
null_policy null_handling, | ||
null_order null_precedence, | ||
rank_percentage percentage) except +libcudf_exception_handler | ||
|
||
cdef extern from "cudf/detail/aggregation/aggregation.hpp" \ | ||
namespace "cudf::detail" nogil: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hmm we don't expose pretty much any cudf detail APIs to pylibcudf, and I don't want to start here. Can we open an issue about these? If these are attributes that are absolutely necessary to reconstruct the serialized types, then we should discuss exposing them publicly in libcudf. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the comment Vyas, I've opened #17630. Please let me know if there's anything else I can do. |
||
|
||
cdef cppclass std_var_aggregation( | ||
rolling_aggregation, | ||
groupby_aggregation, | ||
reduce_aggregation, | ||
segmented_reduce_aggregation | ||
): | ||
size_type _ddof | ||
|
||
cdef cppclass quantile_aggregation(groupby_aggregation, reduce_aggregation): | ||
vector[double] _quantiles | ||
interpolation _interpolation | ||
|
||
cdef cppclass nunique_aggregation( | ||
groupby_aggregation, reduce_aggregation, segmented_reduce_aggregation | ||
): | ||
null_policy _null_handling | ||
|
||
cdef cppclass nth_element_aggregation( | ||
groupby_aggregation, reduce_aggregation, rolling_aggregation | ||
): | ||
size_type _n | ||
null_policy _null_handling | ||
|
||
cdef cppclass ewma_aggregation(scan_aggregation): | ||
double center_of_mass | ||
ewm_history history | ||
|
||
cdef cppclass rank_aggregation( | ||
rolling_aggregation, groupby_scan_aggregation, reduce_aggregation | ||
): | ||
rank_method _method | ||
order _column_order | ||
null_policy _null_handling | ||
null_order _null_precedence | ||
rank_percentage _percentage | ||
|
||
cdef cppclass collect_list_aggregation( | ||
rolling_aggregation, groupby_aggregation, reduce_aggregation | ||
): | ||
null_policy _null_handling | ||
|
||
cdef cppclass collect_set_aggregation( | ||
rolling_aggregation, groupby_aggregation, reduce_aggregation | ||
): | ||
null_policy _null_handling | ||
null_equality _nulls_equal | ||
nan_equality _nans_equal | ||
|
||
cdef cppclass udf_aggregation(rolling_aggregation): | ||
string _source | ||
data_type _output_type | ||
|
||
cdef cppclass correlation_aggregation(groupby_aggregation): | ||
correlation_type _type | ||
size_type _min_periods | ||
|
||
cdef cppclass covariance_aggregation(groupby_aggregation): | ||
size_type _min_periods | ||
size_type _ddof |
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.
Can we replace this cascade with a singledispatch helper function? It's a lot of clauses to fail through in the worst case.