TODO: convert pretrained models to UBJSON for XGBoost v3 support
XGBoost 3.1+ dropped loading support for the legacy binary format (dmlc/xgboost#11307). All pretrained models in constants.py are still in that legacy binary format (pre-1.0.0), so they fail to load on xgboost>=3.1:
xgboost._c_api.XGBoostError: [...] c_api.cc:1523: Check failed: str[0] == '{'
Verified: 2.1.4 and 3.0.5 load fine (with a deprecation warning), 3.3.0 fails. This is why pyproject.toml currently pins xgboost>=1.3,<3.
Tasks:
Compat note: UBJSON support was only added in xgboost 1.6 — verified .ubj/.json files saved by 2.1.4 fail to load on 1.3.3/1.4.2/1.5.2, work from 1.6.2 up. So this conversion also requires raising the lower pin bound from >=1.3 to >=1.6.
TODO: convert pretrained models to UBJSON for XGBoost v3 support
XGBoost 3.1+ dropped loading support for the legacy binary format (dmlc/xgboost#11307). All pretrained models in
constants.pyare still in that legacy binary format (pre-1.0.0), so they fail to load on xgboost>=3.1:Verified: 2.1.4 and 3.0.5 load fine (with a deprecation warning), 3.3.0 fails. This is why
pyproject.tomlcurrently pinsxgboost>=1.3,<3.Tasks:
.ubj(booster.save_model("model.ubj"))ms2pip/constants.pypyproject.tomlpin to allow xgboost 3.xCompat note: UBJSON support was only added in xgboost 1.6 — verified
.ubj/.jsonfiles saved by 2.1.4 fail to load on 1.3.3/1.4.2/1.5.2, work from 1.6.2 up. So this conversion also requires raising the lower pin bound from>=1.3to>=1.6.