Fix sparse threshold warning. (#8268)
This commit is contained in:
parent
ff71c69adf
commit
4056974e37
@ -244,7 +244,8 @@ BatchSet<GHistIndexMatrix> IterativeDMatrix::GetGradientIndex(BatchParam const&
|
|||||||
ghist_ = std::make_shared<GHistIndexMatrix>(&ctx_, Info(), *ellpack_, param);
|
ghist_ = std::make_shared<GHistIndexMatrix>(&ctx_, Info(), *ellpack_, param);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (param.sparse_thresh != tree::TrainParam::DftSparseThreshold()) {
|
if (!std::isnan(param.sparse_thresh) &&
|
||||||
|
param.sparse_thresh != tree::TrainParam::DftSparseThreshold()) {
|
||||||
LOG(WARNING) << "`sparse_threshold` can not be changed when `QuantileDMatrix` is used instead "
|
LOG(WARNING) << "`sparse_threshold` can not be changed when `QuantileDMatrix` is used instead "
|
||||||
"of `DMatrix`.";
|
"of `DMatrix`.";
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user