[Data] GroupedData.map_groups()
doesn't allow partial callables
#46185
Labels
bug
Something that is supposed to be working; but isn't
data
Ray Data-related issues
good first issue
Great starter issue for someone just starting to contribute to Ray
P1
Issue that should be fixed within a few weeks
What happened + What you expected to happen
In this PR, a new requirement was imposed on the
fn
callable given as input toGroupedData.map_groups()
: that it have a__name__
attribute. Unfortunately, callables partially parametrized usingfunctools.partial()
have no such attribute, so passing them into.map_groups()
raises an error:AttributeError: 'functools.partial' object has no attribute '__name__'
. This did not happen prior to the linked PR.It's not a huge deal, but it did cause code to break unexpectedly, and I guess technically is in conflict with the type annotations on this method.
Versions / Dependencies
ray >= 2.21
PY3.10
macOS 14.4
Reproduction script
Issue Severity
Low: It annoys or frustrates me.
The text was updated successfully, but these errors were encountered: