Add Possibility to Load XGBoost Models as PySpark Models#11449
Add Possibility to Load XGBoost Models as PySpark Models#11449ayoub317 wants to merge 1 commit intodmlc:masterfrom
Conversation
39d1379 to
a3acff2
Compare
a3acff2 to
1688ddb
Compare
| raise NotImplementedError() | ||
|
|
||
| @classmethod | ||
| def convert_sklearn_model_to_spark_xgb_model( |
There was a problem hiding this comment.
will this function be exposed to users?
There was a problem hiding this comment.
I think it is good to expose it to users so that if they have already loaded or trained an sklearn model, and maybe want to make predictions on a large dataset they can do it without the need to save the model to disk and then load it back with the load_model method.
trivialfis
left a comment
There was a problem hiding this comment.
Thank you for working on this. But what's the difference between the approach taken here and the following snippet?
from xgboost.spark import SparkXGBRegressorModel
from xgboost import XGBRegressor
reg = XGBRegressor()
SparkXGBRegressorModel(reg, None)|
Hello @trivialfis , |
|
LGTM. |
Closes #11400
The default values for
device,use_gpuandtree_methodwere added due to this function call, and eventually this one which assumes they already exist in_paramMapor_defaultParamMap.