Skip to content

xgboost/ineffective-max-quantile-batches

Rule ineffective-max-quantile-batches
Pack XGBoost
Severity warning
Fix safe, with xpd check --fix
Library versions XGBoost 3.3 and later

XGBoost 3.3 deprecated max_quantile_batches and made it ineffective. Setting it no longer limits how many GPU batches XGBoost combines when building a quantile sketch.

train = xgb.QuantileDMatrix(features, label=labels, max_quantile_batches=4)
train = xgb.QuantileDMatrix(features, label=labels)

The rule reports explicit values other than literal None on QuantileDMatrix and ExtMemQuantileDMatrix constructors from XGBoost.

Use xpd check --fix to remove an integer literal setting that follows another argument in a call without unpacked arguments or comments. Remove other settings by hand so you can preserve any evaluation of their values. If your workload depended on the old limit, recheck its peak memory use.

QuantileDMatrix API · ExtMemQuantileDMatrix API

xpd prints this message with the issue. A name that starts with $ stands for code from your file.

XGBoost 3.3 deprecated max_quantile_batches. This setting no longer limits the number of GPU quantile batches.

Browse the other rules of the XGBoost pack.