-
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
Remove cudf._lib.nvtext in favor of inlining pylibcudf #17535
Remove cudf._lib.nvtext in favor of inlining pylibcudf #17535
Conversation
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.
One general thought for future improvements, but overall looks good.
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 wonder if it's worth capturing the general pattern of:
return type(self).from_pylibcudf(
getattr(plc, func)(
self.to_pylibcudf(mode="read"),
*args,
**kwargs,
)
)
into a helper function is worthwhile. In addition to reducing boilerplate, it could also be useful to inject standard bits error handling or other pylibcudf wrapping that we always want in place. It may be harder to placate mypy with that kind of code though.
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.
In the long run I'd envision this function also being able to handle things like _with_type_metadata
, for example.
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.
Yeah the to/from_pylibcudf pattern is pretty common. I think it may be worth capturing in a helper function, but it may also depend on how much I can make the current cudf Column
just be a pylibcudf Column directly
/merge |
Description
Contributes to #17317
Checklist