Use `UpdateAllowUnknown' for non-model related parameter. (#4961)

* Use `UpdateAllowUnknown' for non-model related parameter.

Model parameter can not pack an additional boolean value due to binary IO
format.  This commit deals only with non-model related parameter configuration.

* Add tidy command line arg for use-dmlc-gtest.
This commit is contained in:
Jiaming Yuan
2019-10-23 05:50:12 -04:00
committed by GitHub
parent f24be2efb4
commit ac457c56a2
44 changed files with 189 additions and 112 deletions

View File

@@ -327,7 +327,6 @@ struct EvalEWiseBase : public Metric {
CHECK_EQ(preds.Size(), info.labels_.Size())
<< "label and prediction size not match, "
<< "hint: use merror or mlogloss for multi-class classification";
const auto ndata = static_cast<omp_ulong>(info.labels_.Size());
int device = tparam_->gpu_id;
auto result =

View File

@@ -5,7 +5,6 @@
#ifndef XGBOOST_METRIC_METRIC_COMMON_H_
#define XGBOOST_METRIC_METRIC_COMMON_H_
#include <dmlc/parameter.h>
#include "../common/common.h"
namespace xgboost {

View File

@@ -172,7 +172,6 @@ struct EvalMClassBase : public Metric {
CHECK_GE(nclass, 1U)
<< "mlogloss and merror are only used for multi-class classification,"
<< " use logloss for binary classification";
const auto ndata = static_cast<bst_omp_uint>(info.labels_.Size());
int device = tparam_->gpu_id;
auto result = reducer_.Reduce(*tparam_, device, nclass, info.weights_, info.labels_, preds);