-
-
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] Refactor XGBoost.scala to put all params processing in one place #4815
[jvm-packages] Refactor XGBoost.scala to put all params processing in one place #4815
Conversation
if (overridedParams.contains("nthread")) { | ||
val nThread = overridedParams("nthread").toString.toInt | ||
require(nThread <= coresPerTask, | ||
s"the nthread configuration ($nThread) must be no larger than " + |
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.
Reasonable, but why is it a requirement?
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 logic is nthread are threads used by xgb to train
coresPerTasks is how many cores allocated to each task by cluster manager,
so nthread > coresPerTasks does not make sense
if (numEarlyStoppingRounds > 0 && | ||
!overridedParams.contains("maximize_evaluation_metrics")) { | ||
if (overridedParams.contains("custom_eval")) { | ||
throw new IllegalArgumentException("custom_eval does not support early stopping") |
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.
What's hurdle for supporting it?
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.
we need a mechanism to support metrics sync, but we didn't reach to the agreement
validateSparkSslConf | ||
|
||
if (overridedParams.contains("tree_method")) { | ||
require(overridedParams("tree_method") == "hist" || |
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 think we have gpu hist now. But sure when it can be upstreamed. Just trying to take a note.
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.
nice
several pattern matching needs to be changed when adding a new param now, e.g. #4805
this PR is to refactor XGBoost.scala to make code cleaner