Fix ignoring dart in updater configuration. (#4024)

* Fix ignoring dart in updater configuration.
This commit is contained in:
Jiaming Yuan
2018-12-26 18:24:45 +08:00
committed by GitHub
parent 9897b5042f
commit be948df23f
2 changed files with 8 additions and 1 deletions

View File

@@ -185,7 +185,8 @@ class LearnerImpl : public Learner {
/*! \brief Map `tree_method` parameter to `updater` parameter */
void ConfigureUpdaters() {
// This method is not applicable to non-tree learners
if (cfg_.count("booster") > 0 && cfg_.at("booster") != "gbtree") {
if (cfg_.find("booster") != cfg_.cend() &&
(cfg_.at("booster") != "gbtree" && cfg_.at("booster") != "dart")) {
return;
}
// `updater` parameter was manually specified