Closed Nick-Yazdani closed 1 year ago
Thank you for using GPBoost. This is a duplicate of #44. Using pickle does not work because of most of the data is not kept in Python but in "C++".
GPBoost models can be saved and loaded from files using internal functions as illustrated here: https://github.com/fabsig/GPBoost/blob/d374619055f2b648cb7b5a44cfd15facc339f4fb/examples/python-guide/GPBoost_algorithm.py#L255
May I ask what the point of having a scikit-learn wrapper is if we can't serialize sklearn pipelines that contain the wrapped model?
Thanks for pointing this out. I added this feature. Starting from version 1.1.0, scikit-learn wrapper API models can be saved and loaded. See here for an example: https://github.com/fabsig/GPBoost/blob/b759d40199768f21ce6c41261722dc032c7bf651/examples/python-guide/sklearn_example.py#L115
Oh wow, that is excellent. Thank you so much!
Ran into this error when trying to serialize a scikit-learn pipeline that was composed of StandardScaler and GPBoostRegressor (after it had been fit).