From eb5ad489db671087db0aca45b623c2b2cf8e8f0d Mon Sep 17 00:00:00 2001 From: Hyunsu Cho Date: Mon, 21 Nov 2022 12:15:42 -0800 Subject: [PATCH] Support XGBoost 1.7 --- src/frontend/xgboost_json.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/frontend/xgboost_json.cc b/src/frontend/xgboost_json.cc index bbb641fd..7b1298b4 100644 --- a/src/frontend/xgboost_json.cc +++ b/src/frontend/xgboost_json.cc @@ -405,7 +405,8 @@ bool LearnerParamHandler::String(const char *str, output.param.global_bias) || assign_value("num_class", static_cast(std::max(std::atoi(str), 1)), output.task_param.num_class) || - assign_value("num_feature", std::atoi(str), output.num_feature)); + assign_value("num_feature", std::atoi(str), output.num_feature) || + check_cur_key("boost_from_average")); } /******************************************************************************