Restore functionality of max_depth=0 in hist (#7551)

* Restore functionality of max_depth=0 in hist

* Add test case
This commit is contained in:
Philip Hyunsu Cho
2022-01-10 09:37:44 -08:00
committed by GitHub
parent 2db808021d
commit 20c0d60ac7
2 changed files with 16 additions and 1 deletions

View File

@@ -263,7 +263,7 @@ void QuantileHistMaker::Builder<GradientSumT>::ExpandTree(
ApplySplit<any_missing>(nodes_for_apply_split, gmat, column_matrix, p_tree);
SplitSiblings(nodes_for_apply_split, &nodes_to_evaluate, p_tree);
if (depth < param_.max_depth) {
if (param_.max_depth == 0 || depth < param_.max_depth) {
size_t i = 0;
for (auto const &gidx : p_fmat->GetBatches<GHistIndexMatrix>(
{GenericParameter::kCpuId, param_.max_bin})) {