-
-
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
[jvm-packages] Automatically set maximize_evaluation_metrics if not explicitly given in XGBoost4J-Spark #4446
Conversation
thanks, would you please also update https://xgboost.readthedocs.io/en/latest/jvm/xgboost4j_spark_tutorial.html#early-stopping accordingly? |
@CodingCat Document is updated in new commits. |
@hcho3 jenkins says |
@CodingCat Looks like we need to expand the volume for the slave node |
It seems that 2 failures of checks are not caused by my code change but the disk volume. |
I’m looking at the disk space issue. |
@CodingCat @rongou I went ahead and increased the disk space. |
@@ -160,7 +160,7 @@ object XGBoost extends Serializable { | |||
.map(_.toString.toInt).getOrElse(0) | |||
val overridedParams = if (numEarlyStoppingRounds > 0 && | |||
!params.contains("maximize_evaluation_metrics")) { | |||
if params.contains("custom_eval") { | |||
if (params.contains("custom_eval")) { |
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.
when num_early_stopping_rounds
is non-zero, eval_metric
is a built-in metric, the custom_eval
is still in params, just the value is null, so it will still throw an exception.
So the if condition should be if (params.contains("custom_eval") && params("custom_eval") != null)
or remove custom_eval
from params.
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.
Hmmm....I think I missed some part of this PR
The reality is early stopping doesn’t work with custom metrics
This pull request is aimed at resolving "[jvm-packages] false should be the default value of maximize_evaluation_metrics"(#4422).
The metric names to maximize are aligned with xgboost.callback.early_stop in the Python package.
To avoid duplicating codes in both
XGBoostClassifier
andXGBoostRegressor
, parametermaximize_evaluation_metrics
is set in XGBoost.scala when not provided by user.closes #4422