Remove old warning in 1.3 (#7279)

This commit is contained in:
Jiaming Yuan 2021-10-01 08:05:50 +08:00 committed by GitHub
parent 2a0368b7ca
commit b3b03200e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1117,12 +1117,8 @@ class LearnerImpl : public LearnerIO {
<< before << "' to '" << after << "'. Explicitly set eval_metric if you'd "
<< "like to restore the old behavior.";
};
if (tparam_.objective == "binary:logistic") {
warn_default_eval_metric(tparam_.objective, "error", "logloss", "1.3.0");
} else if (tparam_.objective == "binary:logitraw") {
if (tparam_.objective == "binary:logitraw") {
warn_default_eval_metric(tparam_.objective, "auc", "logloss", "1.4.0");
} else if ((tparam_.objective == "multi:softmax" || tparam_.objective == "multi:softprob")) {
warn_default_eval_metric(tparam_.objective, "merror", "mlogloss", "1.3.0");
}
metrics_.emplace_back(Metric::Create(obj_->DefaultEvalMetric(), &generic_parameters_));
metrics_.back()->Configure({cfg_.begin(), cfg_.end()});