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:
@@ -262,7 +262,7 @@ class QuantileHistMock : public QuantileHistMaker {
|
||||
gmat.Init((*dmat_).get(), kMaxBins);
|
||||
|
||||
RegTree tree = RegTree();
|
||||
tree.param.InitAllowUnknown(cfg_);
|
||||
tree.param.UpdateAllowUnknown(cfg_);
|
||||
|
||||
std::vector<GradientPair> gpair =
|
||||
{ {0.23f, 0.24f}, {0.23f, 0.24f}, {0.23f, 0.24f}, {0.23f, 0.24f},
|
||||
@@ -273,7 +273,7 @@ class QuantileHistMock : public QuantileHistMaker {
|
||||
|
||||
void TestBuildHist() {
|
||||
RegTree tree = RegTree();
|
||||
tree.param.InitAllowUnknown(cfg_);
|
||||
tree.param.UpdateAllowUnknown(cfg_);
|
||||
|
||||
size_t constexpr kMaxBins = 4;
|
||||
common::GHistIndexMatrix gmat;
|
||||
@@ -284,7 +284,7 @@ class QuantileHistMock : public QuantileHistMaker {
|
||||
|
||||
void TestEvaluateSplit() {
|
||||
RegTree tree = RegTree();
|
||||
tree.param.InitAllowUnknown(cfg_);
|
||||
tree.param.UpdateAllowUnknown(cfg_);
|
||||
|
||||
builder_->TestEvaluateSplit(gmatb_, tree);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user