-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
[pyspark] Add param validation for "objective" and "eval_metric" param, and remove invalid booster params #8173
[pyspark] Add param validation for "objective" and "eval_metric" param, and remove invalid booster params #8173
Conversation
Please fix the formatting error: https://github.com/dmlc/xgboost/runs/7824147126?check_suite_focus=true . |
Any update? |
@@ -267,6 +267,18 @@ def _validate_params(self): | |||
"If features_cols param set, then features_col param is ignored." | |||
) | |||
|
|||
if self.getOrDefault(self.objective) is not None: |
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.
It does not make sense (to me) to check the type of a parameter that already has the typeConverter
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.
The "objective" param is automatically generated, currently it does not have type converter.
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 still hope we can find a common solution for the type converter in the following PR
Signed-off-by: Weichen Xu <weichen.xu@databricks.com>
Signed-off-by: Ubuntu <weichen.xu@ip-10-110-30-183.us-west-2.compute.internal>
python-package/xgboost/spark/core.py
Outdated
if not gpu_per_task: | ||
# For spark cluster with GPU config, the "spark.task.resource.gpu.amount" | ||
# config might not be set. In this case, the default gpu per task is 1. | ||
# If running on no GPU available, in spark task calling `_get_gpu_id` will | ||
# raise gpu not found error. | ||
gpu_per_task = "1" |
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.
@wbo4958 A notable fix.
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.
My fault, reverted this.
CC @trivialfis @wbo4958 Done. |
@trivialfis @wbo4958 We can merge this. The test failures are not related to my PR. |
xgboost.train
spark.task.resource.gpu.amount
config is not set.