-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failing to prune XGBoost tree models #21
Comments
Looks like you've trained an XGBoost model, which contains no-op nodes. The JPMML-XGBoost automatically tries to eliminate those nodes (because they are provably unreachable under any and all scenarios) by applying a special tree model pruning algorithm implementes as I was sure that the tree pruning code will always succeed. However, you've managed to train an XGBoost model that contains such an unusual "internal structure" that the tree pruning code still fails. Can you share your model file so that I could take a look at this unusual "internal structure" myself? Or if it's trained on proprietary data, can you reproduce the pruning error using some publicly available toy dataset? |
As a workaround, you should dsable tree pruning by specifying the pipeline = PMMLPipeline([
("xgb", XGBClassifier())
])
pipeline.fit(X, y)
# THIS - specify conversion options right after fitting the pipeline
pipeline.configure(prune = False)
sklearn2pmml(pipeline, "XGBoost.pmml") |
Thanks a lot! It works now |
Hi, I want to use sklearn2pmml() function to convert a PMML file.
I created an issuse below, but I was not able to reopen it so I create this new issue and just copy the content again here.
jpmml/jpmml-sklearn#160
Here is my code to create a pipeline. But I saw an error
RuntimeError: The JPMML-SkLearn conversion application has failed. The Java executable should have printed more information about the failure into its standard output and/or standard error streams
How can I solve it? My version is 0.73.1
The text was updated successfully, but these errors were encountered: