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:
@@ -12,6 +12,8 @@
|
||||
#include <xgboost/learner.h>
|
||||
#include <xgboost/data.h>
|
||||
#include <xgboost/logging.h>
|
||||
#include <xgboost/parameter.h>
|
||||
|
||||
#include <dmlc/timer.h>
|
||||
#include <iomanip>
|
||||
#include <ctime>
|
||||
@@ -30,7 +32,7 @@ enum CLITask {
|
||||
kPredict = 2
|
||||
};
|
||||
|
||||
struct CLIParam : public dmlc::Parameter<CLIParam> {
|
||||
struct CLIParam : public XGBoostParameter<CLIParam> {
|
||||
/*! \brief the task name */
|
||||
int task;
|
||||
/*! \brief whether evaluate training statistics */
|
||||
@@ -123,7 +125,7 @@ struct CLIParam : public dmlc::Parameter<CLIParam> {
|
||||
// customized configure function of CLIParam
|
||||
inline void Configure(const std::vector<std::pair<std::string, std::string> >& _cfg) {
|
||||
this->cfg = _cfg;
|
||||
this->InitAllowUnknown(_cfg);
|
||||
this->UpdateAllowUnknown(_cfg);
|
||||
for (const auto& kv : _cfg) {
|
||||
if (!strncmp("eval[", kv.first.c_str(), 5)) {
|
||||
char evname[256];
|
||||
|
||||
@@ -25,7 +25,7 @@ namespace gbm {
|
||||
DMLC_REGISTRY_FILE_TAG(gblinear);
|
||||
|
||||
// training parameters
|
||||
struct GBLinearTrainParam : public dmlc::Parameter<GBLinearTrainParam> {
|
||||
struct GBLinearTrainParam : public XGBoostParameter<GBLinearTrainParam> {
|
||||
std::string updater;
|
||||
float tolerance;
|
||||
size_t max_row_perbatch;
|
||||
@@ -64,7 +64,7 @@ class GBLinear : public GradientBooster {
|
||||
if (model_.weight.size() == 0) {
|
||||
model_.param.InitAllowUnknown(cfg);
|
||||
}
|
||||
param_.InitAllowUnknown(cfg);
|
||||
param_.UpdateAllowUnknown(cfg);
|
||||
updater_.reset(LinearUpdater::Create(param_.updater, learner_param_));
|
||||
updater_->Configure(cfg);
|
||||
monitor_.Init("GBLinear");
|
||||
|
||||
@@ -34,7 +34,7 @@ DMLC_REGISTRY_FILE_TAG(gbtree);
|
||||
|
||||
void GBTree::Configure(const Args& cfg) {
|
||||
this->cfg_ = cfg;
|
||||
tparam_.InitAllowUnknown(cfg);
|
||||
tparam_.UpdateAllowUnknown(cfg);
|
||||
|
||||
model_.Configure(cfg);
|
||||
|
||||
@@ -295,7 +295,7 @@ class Dart : public GBTree {
|
||||
void Configure(const Args& cfg) override {
|
||||
GBTree::Configure(cfg);
|
||||
if (model_.trees.size() == 0) {
|
||||
dparam_.InitAllowUnknown(cfg);
|
||||
dparam_.UpdateAllowUnknown(cfg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ namespace xgboost {
|
||||
namespace gbm {
|
||||
|
||||
/*! \brief training parameters */
|
||||
struct GBTreeTrainParam : public dmlc::Parameter<GBTreeTrainParam> {
|
||||
struct GBTreeTrainParam : public XGBoostParameter<GBTreeTrainParam> {
|
||||
/*!
|
||||
* \brief number of parallel trees constructed each iteration
|
||||
* use this option to support boosted random forest
|
||||
@@ -95,7 +95,7 @@ struct GBTreeTrainParam : public dmlc::Parameter<GBTreeTrainParam> {
|
||||
};
|
||||
|
||||
/*! \brief training parameters */
|
||||
struct DartTrainParam : public dmlc::Parameter<DartTrainParam> {
|
||||
struct DartTrainParam : public XGBoostParameter<DartTrainParam> {
|
||||
/*! \brief type of sampling algorithm */
|
||||
int sample_type;
|
||||
/*! \brief type of normalization algorithm */
|
||||
|
||||
@@ -5,13 +5,8 @@
|
||||
* \author Tianqi Chen
|
||||
*/
|
||||
#include <dmlc/io.h>
|
||||
#include <dmlc/timer.h>
|
||||
#include <dmlc/any.h>
|
||||
#include <xgboost/feature_map.h>
|
||||
#include <xgboost/learner.h>
|
||||
#include <xgboost/base.h>
|
||||
#include <xgboost/logging.h>
|
||||
#include <xgboost/generic_parameters.h>
|
||||
#include <dmlc/parameter.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <iomanip>
|
||||
#include <limits>
|
||||
@@ -21,6 +16,12 @@
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include "xgboost/feature_map.h"
|
||||
#include "xgboost/learner.h"
|
||||
#include "xgboost/base.h"
|
||||
#include "xgboost/parameter.h"
|
||||
#include "xgboost/logging.h"
|
||||
#include "xgboost/generic_parameters.h"
|
||||
#include "xgboost/host_device_vector.h"
|
||||
#include "common/common.h"
|
||||
#include "common/io.h"
|
||||
@@ -103,7 +104,7 @@ struct LearnerModelParam : public dmlc::Parameter<LearnerModelParam> {
|
||||
}
|
||||
};
|
||||
|
||||
struct LearnerTrainParam : public dmlc::Parameter<LearnerTrainParam> {
|
||||
struct LearnerTrainParam : public XGBoostParameter<LearnerTrainParam> {
|
||||
// data split mode, can be row, col, or none.
|
||||
DataSplitMode dsplit;
|
||||
// flag to disable default metric
|
||||
@@ -155,9 +156,9 @@ class LearnerImpl : public Learner {
|
||||
auto old_tparam = tparam_;
|
||||
Args args = {cfg_.cbegin(), cfg_.cend()};
|
||||
|
||||
tparam_.InitAllowUnknown(args);
|
||||
tparam_.UpdateAllowUnknown(args);
|
||||
|
||||
generic_param_.InitAllowUnknown(args);
|
||||
generic_param_.UpdateAllowUnknown(args);
|
||||
generic_param_.CheckDeprecated();
|
||||
|
||||
ConsoleLogger::Configure(args);
|
||||
@@ -208,7 +209,7 @@ class LearnerImpl : public Learner {
|
||||
}
|
||||
|
||||
void Load(dmlc::Stream* fi) override {
|
||||
generic_param_.InitAllowUnknown(Args{});
|
||||
generic_param_.UpdateAllowUnknown(Args{});
|
||||
tparam_.Init(std::vector<std::pair<std::string, std::string>>{});
|
||||
// TODO(tqchen) mark deprecation of old format.
|
||||
common::PeekableInStream fp(fi);
|
||||
@@ -314,7 +315,7 @@ class LearnerImpl : public Learner {
|
||||
cfg_.insert(n.cbegin(), n.cend());
|
||||
|
||||
Args args = {cfg_.cbegin(), cfg_.cend()};
|
||||
generic_param_.InitAllowUnknown(args);
|
||||
generic_param_.UpdateAllowUnknown(args);
|
||||
gbm_->Configure(args);
|
||||
obj_->Configure({cfg_.begin(), cfg_.end()});
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include <limits>
|
||||
|
||||
#include "xgboost/data.h"
|
||||
#include "xgboost/parameter.h"
|
||||
#include "./param.h"
|
||||
#include "../gbm/gblinear_model.h"
|
||||
#include "../common/random.h"
|
||||
@@ -17,7 +18,7 @@
|
||||
namespace xgboost {
|
||||
namespace linear {
|
||||
|
||||
struct CoordinateParam : public dmlc::Parameter<CoordinateParam> {
|
||||
struct CoordinateParam : public XGBoostParameter<CoordinateParam> {
|
||||
int top_k;
|
||||
DMLC_DECLARE_PARAMETER(CoordinateParam) {
|
||||
DMLC_DECLARE_FIELD(top_k)
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
#ifndef XGBOOST_LINEAR_PARAM_H_
|
||||
#define XGBOOST_LINEAR_PARAM_H_
|
||||
#include <dmlc/parameter.h>
|
||||
#include "xgboost/parameter.h"
|
||||
|
||||
namespace xgboost {
|
||||
namespace linear {
|
||||
@@ -20,7 +20,7 @@ enum FeatureSelectorEnum {
|
||||
kRandom
|
||||
};
|
||||
|
||||
struct LinearTrainParam : public dmlc::Parameter<LinearTrainParam> {
|
||||
struct LinearTrainParam : public XGBoostParameter<LinearTrainParam> {
|
||||
/*! \brief learning_rate */
|
||||
float learning_rate;
|
||||
/*! \brief regularization weight for L2 norm */
|
||||
|
||||
@@ -26,9 +26,9 @@ class CoordinateUpdater : public LinearUpdater {
|
||||
// set training parameter
|
||||
void Configure(Args const& args) override {
|
||||
const std::vector<std::pair<std::string, std::string> > rest {
|
||||
tparam_.InitAllowUnknown(args)
|
||||
tparam_.UpdateAllowUnknown(args)
|
||||
};
|
||||
cparam_.InitAllowUnknown(rest);
|
||||
cparam_.UpdateAllowUnknown(rest);
|
||||
selector_.reset(FeatureSelector::Create(tparam_.feature_selector));
|
||||
monitor_.Init("CoordinateUpdater");
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*!
|
||||
* Copyright 2018 by Contributors
|
||||
* Copyright 2018-2019 by Contributors
|
||||
* \author Rory Mitchell
|
||||
*/
|
||||
|
||||
@@ -36,7 +36,7 @@ class GPUCoordinateUpdater : public LinearUpdater { // NOLINT
|
||||
|
||||
// set training parameter
|
||||
void Configure(Args const& args) override {
|
||||
tparam_.InitAllowUnknown(args);
|
||||
tparam_.UpdateAllowUnknown(args);
|
||||
selector_.reset(FeatureSelector::Create(tparam_.feature_selector));
|
||||
monitor_.Init("GPUCoordinateUpdater");
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ class ShotgunUpdater : public LinearUpdater {
|
||||
public:
|
||||
// set training parameter
|
||||
void Configure(Args const& args) override {
|
||||
param_.InitAllowUnknown(args);
|
||||
param_.UpdateAllowUnknown(args);
|
||||
if (param_.feature_selector != kCyclic &&
|
||||
param_.feature_selector != kShuffle) {
|
||||
LOG(FATAL) << "Unsupported feature selector for shotgun updater.\n"
|
||||
|
||||
@@ -5,12 +5,13 @@
|
||||
* \author Tianqi Chen
|
||||
*/
|
||||
#include <rabit/rabit.h>
|
||||
#include <dmlc/parameter.h>
|
||||
#include <xgboost/logging.h>
|
||||
|
||||
#include <iostream>
|
||||
#include <map>
|
||||
|
||||
#include "xgboost/parameter.h"
|
||||
#include "xgboost/logging.h"
|
||||
|
||||
#if !defined(XGBOOST_STRICT_R_MODE) || XGBOOST_STRICT_R_MODE == 0
|
||||
// Override logging mechanism for non-R interfaces
|
||||
void dmlc::CustomLogMessage::Log(const std::string& msg) {
|
||||
@@ -51,7 +52,7 @@ bool ConsoleLogger::ShouldLog(LogVerbosity verbosity) {
|
||||
}
|
||||
|
||||
void ConsoleLogger::Configure(Args const& args) {
|
||||
param_.InitAllowUnknown(args);
|
||||
param_.UpdateAllowUnknown(args);
|
||||
// Deprecated, but when trying to display deprecation message some R
|
||||
// tests trying to catch stdout will fail.
|
||||
if (param_.silent) {
|
||||
|
||||
@@ -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 =
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -5,16 +5,18 @@
|
||||
* \author Tianqi Chen
|
||||
*/
|
||||
#include <dmlc/omp.h>
|
||||
#include <dmlc/parameter.h>
|
||||
#include <xgboost/data.h>
|
||||
#include <xgboost/logging.h>
|
||||
#include <xgboost/objective.h>
|
||||
|
||||
#include <vector>
|
||||
#include <algorithm>
|
||||
#include <limits>
|
||||
#include <utility>
|
||||
|
||||
#include "xgboost/parameter.h"
|
||||
#include "xgboost/data.h"
|
||||
#include "xgboost/logging.h"
|
||||
#include "xgboost/objective.h"
|
||||
#include "xgboost/json.h"
|
||||
|
||||
#include "../common/common.h"
|
||||
#include "../common/math.h"
|
||||
#include "../common/transform.h"
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
/*!
|
||||
* Copyright 2017-2018 by Contributors
|
||||
*/
|
||||
#include <dmlc/parameter.h>
|
||||
#include <thrust/copy.h>
|
||||
#include <thrust/device_ptr.h>
|
||||
#include <thrust/device_vector.h>
|
||||
#include <thrust/fill.h>
|
||||
#include <memory>
|
||||
|
||||
#include "xgboost/parameter.h"
|
||||
#include "xgboost/data.h"
|
||||
#include "xgboost/predictor.h"
|
||||
#include "xgboost/tree_model.h"
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
/*!
|
||||
* Copyright 2017-2019 XGBoost contributors
|
||||
*/
|
||||
|
||||
@@ -7,20 +7,20 @@
|
||||
#ifndef XGBOOST_TREE_PARAM_H_
|
||||
#define XGBOOST_TREE_PARAM_H_
|
||||
|
||||
#include <dmlc/parameter.h>
|
||||
#include <xgboost/data.h>
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
#include <limits>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "xgboost/parameter.h"
|
||||
#include "xgboost/data.h"
|
||||
|
||||
namespace xgboost {
|
||||
namespace tree {
|
||||
|
||||
/*! \brief training parameters for regression tree */
|
||||
struct TrainParam : public dmlc::Parameter<TrainParam> {
|
||||
struct TrainParam : public XGBoostParameter<TrainParam> {
|
||||
// learning step size for a time
|
||||
float learning_rate;
|
||||
// minimum loss change required for a split
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
*/
|
||||
#include <dmlc/json.h>
|
||||
#include <dmlc/registry.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <unordered_set>
|
||||
#include <vector>
|
||||
@@ -15,7 +16,8 @@
|
||||
#include <utility>
|
||||
|
||||
#include "xgboost/logging.h"
|
||||
#include "xgboost/host_device_vector.h"
|
||||
#include "xgboost/parameter.h"
|
||||
|
||||
#include "param.h"
|
||||
#include "split_evaluator.h"
|
||||
#include "../common/common.h"
|
||||
@@ -67,7 +69,7 @@ bool SplitEvaluator::CheckFeatureConstraint(bst_uint nodeid, bst_uint featureid)
|
||||
}
|
||||
|
||||
//! \brief Encapsulates the parameters for ElasticNet
|
||||
struct ElasticNetParams : public dmlc::Parameter<ElasticNetParams> {
|
||||
struct ElasticNetParams : public XGBoostParameter<ElasticNetParams> {
|
||||
bst_float reg_lambda;
|
||||
bst_float reg_alpha;
|
||||
// maximum delta update we can add in weight estimation
|
||||
@@ -105,7 +107,7 @@ class ElasticNet final : public SplitEvaluator {
|
||||
}
|
||||
}
|
||||
void Init(const Args& args) override {
|
||||
params_.InitAllowUnknown(args);
|
||||
params_.UpdateAllowUnknown(args);
|
||||
}
|
||||
|
||||
SplitEvaluator* GetHostClone() const override {
|
||||
@@ -185,7 +187,7 @@ XGBOOST_REGISTER_SPLIT_EVALUATOR(ElasticNet, "elastic_net")
|
||||
split evaluator
|
||||
*/
|
||||
struct MonotonicConstraintParams
|
||||
: public dmlc::Parameter<MonotonicConstraintParams> {
|
||||
: public XGBoostParameter<MonotonicConstraintParams> {
|
||||
std::vector<bst_int> monotone_constraints;
|
||||
|
||||
DMLC_DECLARE_PARAMETER(MonotonicConstraintParams) {
|
||||
@@ -212,7 +214,7 @@ class MonotonicConstraint final : public SplitEvaluator {
|
||||
void Init(const Args& args)
|
||||
override {
|
||||
inner_->Init(args);
|
||||
params_.InitAllowUnknown(args);
|
||||
params_.UpdateAllowUnknown(args);
|
||||
Reset();
|
||||
}
|
||||
|
||||
@@ -337,7 +339,7 @@ XGBOOST_REGISTER_SPLIT_EVALUATOR(MonotonicConstraint, "monotonic")
|
||||
split evaluator
|
||||
*/
|
||||
struct InteractionConstraintParams
|
||||
: public dmlc::Parameter<InteractionConstraintParams> {
|
||||
: public XGBoostParameter<InteractionConstraintParams> {
|
||||
std::string interaction_constraints;
|
||||
bst_uint num_feature;
|
||||
|
||||
@@ -371,7 +373,7 @@ class InteractionConstraint final : public SplitEvaluator {
|
||||
void Init(const Args& args)
|
||||
override {
|
||||
inner_->Init(args);
|
||||
params_.InitAllowUnknown(args);
|
||||
params_.UpdateAllowUnknown(args);
|
||||
Reset();
|
||||
}
|
||||
|
||||
|
||||
@@ -423,7 +423,7 @@ XGBOOST_REGISTER_TREE_IO(JsonGenerator, "json")
|
||||
return new JsonGenerator(fmap, attrs, with_stats);
|
||||
});
|
||||
|
||||
struct GraphvizParam : public dmlc::Parameter<GraphvizParam> {
|
||||
struct GraphvizParam : public XGBoostParameter<GraphvizParam> {
|
||||
std::string yes_color;
|
||||
std::string no_color;
|
||||
std::string rankdir;
|
||||
@@ -462,7 +462,7 @@ class GraphvizGenerator : public TreeGenerator {
|
||||
public:
|
||||
GraphvizGenerator(FeatureMap const& fmap, std::string const& attrs, bool with_stats) :
|
||||
TreeGenerator(fmap, with_stats) {
|
||||
param_.InitAllowUnknown(std::map<std::string, std::string>{});
|
||||
param_.UpdateAllowUnknown(std::map<std::string, std::string>{});
|
||||
using KwArg = std::map<std::string, std::map<std::string, std::string>>;
|
||||
KwArg kwargs;
|
||||
if (attrs.length() != 0) {
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace tree {
|
||||
class BaseMaker: public TreeUpdater {
|
||||
public:
|
||||
void Configure(const Args& args) override {
|
||||
param_.InitAllowUnknown(args);
|
||||
param_.UpdateAllowUnknown(args);
|
||||
}
|
||||
|
||||
protected:
|
||||
|
||||
@@ -26,7 +26,7 @@ DMLC_REGISTRY_FILE_TAG(updater_colmaker);
|
||||
class ColMaker: public TreeUpdater {
|
||||
public:
|
||||
void Configure(const Args& args) override {
|
||||
param_.InitAllowUnknown(args);
|
||||
param_.UpdateAllowUnknown(args);
|
||||
spliteval_.reset(SplitEvaluator::Create(param_.split_evaluator));
|
||||
spliteval_->Init(args);
|
||||
}
|
||||
@@ -773,7 +773,7 @@ class ColMaker: public TreeUpdater {
|
||||
class DistColMaker : public ColMaker {
|
||||
public:
|
||||
void Configure(const Args& args) override {
|
||||
param_.InitAllowUnknown(args);
|
||||
param_.UpdateAllowUnknown(args);
|
||||
pruner_.reset(TreeUpdater::Create("prune", tparam_));
|
||||
pruner_->Configure(args);
|
||||
spliteval_.reset(SplitEvaluator::Create(param_.split_evaluator));
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include "xgboost/host_device_vector.h"
|
||||
#include "xgboost/parameter.h"
|
||||
#include "xgboost/span.h"
|
||||
|
||||
#include "../common/common.h"
|
||||
@@ -38,7 +39,7 @@ DMLC_REGISTRY_FILE_TAG(updater_gpu_hist);
|
||||
|
||||
// training parameters specific to this algorithm
|
||||
struct GPUHistMakerTrainParam
|
||||
: public dmlc::Parameter<GPUHistMakerTrainParam> {
|
||||
: public XGBoostParameter<GPUHistMakerTrainParam> {
|
||||
bool single_precision_histogram;
|
||||
// number of rows in a single GPU batch
|
||||
int gpu_batch_nrows;
|
||||
@@ -969,9 +970,9 @@ class GPUHistMakerSpecialised {
|
||||
public:
|
||||
GPUHistMakerSpecialised() : initialised_{false}, p_last_fmat_{nullptr} {}
|
||||
void Configure(const Args& args, GenericParameter const* generic_param) {
|
||||
param_.InitAllowUnknown(args);
|
||||
param_.UpdateAllowUnknown(args);
|
||||
generic_param_ = generic_param;
|
||||
hist_maker_param_.InitAllowUnknown(args);
|
||||
hist_maker_param_.UpdateAllowUnknown(args);
|
||||
device_ = generic_param_->gpu_id;
|
||||
CHECK_GE(device_, 0) << "Must have at least one device";
|
||||
|
||||
@@ -1107,7 +1108,7 @@ class GPUHistMakerSpecialised {
|
||||
class GPUHistMaker : public TreeUpdater {
|
||||
public:
|
||||
void Configure(const Args& args) override {
|
||||
hist_maker_param_.InitAllowUnknown(args);
|
||||
hist_maker_param_.UpdateAllowUnknown(args);
|
||||
float_maker_.reset();
|
||||
double_maker_.reset();
|
||||
if (hist_maker_param_.single_precision_histogram) {
|
||||
|
||||
@@ -30,7 +30,7 @@ class TreePruner: public TreeUpdater {
|
||||
|
||||
// set training parameter
|
||||
void Configure(const Args& args) override {
|
||||
param_.InitAllowUnknown(args);
|
||||
param_.UpdateAllowUnknown(args);
|
||||
syncher_->Configure(args);
|
||||
}
|
||||
// update the tree, do pruning
|
||||
|
||||
@@ -38,7 +38,7 @@ void QuantileHistMaker::Configure(const Args& args) {
|
||||
pruner_.reset(TreeUpdater::Create("prune", tparam_));
|
||||
}
|
||||
pruner_->Configure(args);
|
||||
param_.InitAllowUnknown(args);
|
||||
param_.UpdateAllowUnknown(args);
|
||||
is_gmat_initialized_ = false;
|
||||
|
||||
// initialize the split evaluator
|
||||
|
||||
@@ -22,7 +22,7 @@ DMLC_REGISTRY_FILE_TAG(updater_refresh);
|
||||
class TreeRefresher: public TreeUpdater {
|
||||
public:
|
||||
void Configure(const Args& args) override {
|
||||
param_.InitAllowUnknown(args);
|
||||
param_.UpdateAllowUnknown(args);
|
||||
}
|
||||
char const* Name() const override {
|
||||
return "refresh";
|
||||
|
||||
Reference in New Issue
Block a user