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

@@ -33,6 +33,9 @@ TEST(learner, SelectTreeMethod) {
learner->Configure({arg("tree_method", "hist")});
ASSERT_EQ(learner->GetConfigurationArguments().at("updater"),
"grow_quantile_histmaker");
learner->Configure({arg{"booster", "dart"}, arg{"tree_method", "hist"}});
ASSERT_EQ(learner->GetConfigurationArguments().at("updater"),
"grow_quantile_histmaker");
#ifdef XGBOOST_USE_CUDA
learner->Configure({arg("tree_method", "gpu_exact")});
ASSERT_EQ(learner->GetConfigurationArguments().at("updater"),
@@ -40,6 +43,9 @@ TEST(learner, SelectTreeMethod) {
learner->Configure({arg("tree_method", "gpu_hist")});
ASSERT_EQ(learner->GetConfigurationArguments().at("updater"),
"grow_gpu_hist");
learner->Configure({arg{"booster", "dart"}, arg{"tree_method", "gpu_hist"}});
ASSERT_EQ(learner->GetConfigurationArguments().at("updater"),
"grow_gpu_hist");
#endif
delete mat_ptr;