Check deprecated n_gpus. (#4908)

This commit is contained in:
Jiaming Yuan
2019-10-02 02:05:14 -04:00
committed by GitHub
parent 7e24a8d245
commit 4ab1df5fe6
2 changed files with 19 additions and 5 deletions

View File

@@ -154,7 +154,10 @@ class LearnerImpl : public Learner {
Args args = {cfg_.cbegin(), cfg_.cend()};
tparam_.InitAllowUnknown(args);
generic_param_.InitAllowUnknown(args);
generic_param_.CheckDeprecated();
ConsoleLogger::Configure(args);
if (generic_param_.nthread != 0) {
omp_set_num_threads(generic_param_.nthread);