From 5815df4c46e7cd8fea02c12f315335f8bfcc28b9 Mon Sep 17 00:00:00 2001 From: Jiaming Yuan Date: Wed, 20 Apr 2022 01:19:09 +0800 Subject: [PATCH] Remove warning in 1.4. (#7815) --- src/learner.cc | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/src/learner.cc b/src/learner.cc index 370b46190..a7bd47e65 100644 --- a/src/learner.cc +++ b/src/learner.cc @@ -1200,16 +1200,6 @@ class LearnerImpl : public LearnerIO { os.precision(std::numeric_limits::max_digits10); os << '[' << iter << ']' << std::setiosflags(std::ios::fixed); if (metrics_.size() == 0 && tparam_.disable_default_eval_metric <= 0) { - auto warn_default_eval_metric = [](const std::string& objective, const std::string& before, - const std::string& after, const std::string& version) { - LOG(WARNING) << "Starting in XGBoost " << version << ", the default evaluation metric " - << "used with the objective '" << objective << "' was changed from '" - << before << "' to '" << after << "'. Explicitly set eval_metric if you'd " - << "like to restore the old behavior."; - }; - if (tparam_.objective == "binary:logitraw") { - warn_default_eval_metric(tparam_.objective, "auc", "logloss", "1.4.0"); - } metrics_.emplace_back(Metric::Create(obj_->DefaultEvalMetric(), &generic_parameters_)); metrics_.back()->Configure({cfg_.begin(), cfg_.end()}); }