Open xiaoqiao21 opened 3 years ago
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 org.jpmml.converter.visitors.TreeModelPruner
.
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 prune = False
conversion option:
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. https://github.com/jpmml/jpmml-sklearn/issues/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