-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
[AIR] Raise error when batch_format
is not specified for BatchMapper
#30366
[AIR] Raise error when batch_format
is not specified for BatchMapper
#30366
Conversation
…fault-batch-type Signed-off-by: amogkam <amogkamsetty@yahoo.com>
Signed-off-by: amogkam <amogkamsetty@yahoo.com>
Signed-off-by: amogkam <amogkamsetty@yahoo.com>
Signed-off-by: amogkam <amogkamsetty@yahoo.com>
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.
lg, we should start eliminating all dangling raw string value of pandas
and numpy
in our tests and specially examples.
@@ -26,7 +26,7 @@ def add_and_modify_udf(df: "pd.DataFrame"): | |||
df["to_be_modified"] *= 2 | |||
return df | |||
|
|||
batch_mapper = BatchMapper(fn=add_and_modify_udf) | |||
batch_mapper = BatchMapper(fn=add_and_modify_udf, batch_format="pandas") |
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.
BatchFormat.PANDAS
@@ -132,7 +132,7 @@ def test_standard_scaler(): | |||
@pytest.mark.parametrize( | |||
"preprocessor", | |||
[ | |||
BatchMapper(fn=lambda x: x), | |||
BatchMapper(fn=lambda x: x, batch_format="pandas"), |
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.
ditto
Hmm @jiaodong, the string API is the user facing API right? For consistency with And so our tests should use the same user facing API? |
…er` (ray-project#30366) In Ray 2.1, we deprecated the default batch_format argument for BatchMapper and made it required. In Ray 2.2, we upgrae the warning from logging a warning to raising an error. Signed-off-by: amogkam <amogkamsetty@yahoo.com> Signed-off-by: Weichen Xu <weichen.xu@databricks.com>
Signed-off-by: amogkam amogkamsetty@yahoo.com
In Ray 2.1, we deprecated the default batch_format argument for
BatchMapper
and made it required. In Ray 2.2, we upgrae the warning from logging a warning to raising an error.Why are these changes needed?
Related issue number
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.