Remove public access to tree model param. (#8902)
* Make tree model param a private member. * Number of features and targets are immutable after construction. This is to reduce the number of places where we can run configuration.
This commit is contained in:
@@ -28,9 +28,8 @@ TEST(Updater, Refresh) {
|
||||
{"num_feature", std::to_string(kCols)},
|
||||
{"reg_lambda", "1"}};
|
||||
|
||||
RegTree tree = RegTree();
|
||||
RegTree tree = RegTree{1u, kCols};
|
||||
auto ctx = CreateEmptyGenericParam(GPUIDX);
|
||||
tree.param.UpdateAllowUnknown(cfg);
|
||||
std::vector<RegTree*> trees{&tree};
|
||||
|
||||
ObjInfo task{ObjInfo::kRegression};
|
||||
|
||||
Reference in New Issue
Block a user