Closed mags3003 closed 4 years ago
Any idea what's causing this issue?
There is a valid technical answer here: https://stackoverflow.com/a/60341839
In brief, XGBoost version 1.0.0 appears to introduce many breaking changes. First, it has switched from the standard sklearn.preprocessing.LabelEncoder
class to a proprietary xgboost.compat.XGBoostLabelEncoder
. Second, it has messed up the "reserved bytes" area of the XGBoost binary file format so that the JPMML-XGBoost library refuses to process it anyway.
The solution is to downgrade from XGBoost 1.0.0 to some 0.9.X version.
I want to save my XGBoost model as pmml using sklearn2pmml. I'm using Python V3.7.3 with Sklearn 0.20.3, sklearn2pmml V0.53.0 & XGBoost V1.0.0. My data is mainly binary, with just 3 columns of continuous data, I'm running my notebook in Databricks and convert my Spark dataframe to a pandas dataframe. Code snippet below
The pipeline fits to the data, generates a score and prediction with pipeline.score(X,y) and pipeline.predict(X), but when I try to write it to pmml, I get the following error:
Any idea what's causing this issue? Thanks