-
Notifications
You must be signed in to change notification settings - Fork 113
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
PMML version downgrade is blocked by Version#XPMML
-annotated vendor extension markup
#433
Comments
This exception is thrown by the It means that your model may be PMML 4.3 compatible, but it "contains" some vendor extensions - a XML markup (typically, some XML attribute) which is not part of the PMML specification. Anyway, the good news is that if you are using JPMML converters (one the Python ML side), and JPMML evaluators (on the Java application side), then this vendor extension is likely to be recognized/supported in both PMML 4.3 and 4.4 modes. The SkLearn2PMML package should contain special logic for dealing with vendor extensions. The |
Now, thinking about this issue, then I can think of the following improvements:
|
Version#XPMML
-annotated vendor extension markup
@pchitimi What you can try right now to clarify the situation: export your model using the default (ie. latest) PMML schema version, and open it in a text editor; then, search for XML element and attributes whose name starts with "x-" (letter "X" followed by hypen). How many/which can you find? If it's only or two pieces of markup, we can verify them together, and you can then proceed to perform the version downgrade manually - by editing the XML namespace declaration. |
Also, perhaps the version downgrade functionality should be available as a separate SkLearn2PMML utility function. This functionality does (potentially-) have many controlling options. Adding them to the main |
Thank you very much for the detailed response including the potential improvement paths @vruusmann! As per your guidance, I was able to identify 4 unique (97 total) XML element/attributes whose name starts with "x-":
|
They are all Fundamentally, this particular attribute can be omitted without breaking the underlying model (the predicted results will come out with extra precision, which qualifies as "noise"). It is a very ancient vendor extension, which should be recognized by all JPMML-Evaluator 1.4.X and newer versions. Anyway, my expectation is that the SkLearn2PMML package should never fail because of the The trouble is that this attribute is always present for XGBoost models. |
Gotcha, just to make sure I understand:
Is my understanding correct or did I miss anything? |
Yes, these two changes should achieve the "PMML schema version downgrade" from 4.4 to 4.3 for XGBoost models. For comparison, you may train a toy LightGBM model (structurally very similar to XGBoost models), and do the following:
Then diff these two files (eg. using the command-line LightGBM models don't need the |
Hello! I am seeing the following issue when attempting to export a model Pipeline to PMML 4.3. I am uncertain if the model requires at least 4.4 or if there are other issues at play here.
Using the debug flag, the output I observe is as follows:
Thank you for your assistance!
The text was updated successfully, but these errors were encountered: