-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
[Data] Add Dataset.rename_columns
#47906
Conversation
Signed-off-by: Balaji Veeramani <[email protected]>
Signed-off-by: Balaji Veeramani <[email protected]>
Signed-off-by: Balaji Veeramani <[email protected]>
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.
Minor comments to align directly with the pyarrow rename_columns
API since we are just thinly wrapping it.
raise ValueError( | ||
"Expected `concurrency` to be an integer or `None`, but got " | ||
f"{concurrency}." | ||
) |
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.
nit, concurrency validation will be done within map_batches
. no need to add it here
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'm performing an additional validation here to avoid this confusing error message when you pass a tuple to concurrency
:
ValueError:
concurrency
is set as a tuple of integers, butfn
is not a callable class: <function Dataset.rename_columns..rename_columns at 0x166532550>. Useconcurrency=n
to control maximum number of workers to use.
Signed-off-by: Balaji Veeramani <[email protected]>
Signed-off-by: Balaji Veeramani <[email protected]>
Fixes ray-project#32261 --------- Signed-off-by: Balaji Veeramani <[email protected]> Signed-off-by: ujjawal-khare <[email protected]>
Why are these changes needed?
Related issue number
Fixes #32261
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/
under thecorresponding
.rst
file.