Comments (6)
This is a very-very odd bug report. The SkLearn2PMML project is based on the JPMML-SkLearn library, which includes two integration test cases for GradientBoostingClassifier
:
https://github.com/jpmml/jpmml-sklearn/blob/master/src/test/java/org/jpmml/sklearn/ClassifierTest.java#L57-L60
https://github.com/jpmml/jpmml-sklearn/blob/master/src/test/java/org/jpmml/sklearn/ClassifierTest.java#L147-L150
If the JPMML-SkLearn library was generating incorrect PMML markup for the second segment, then these integration test cases should cause the build process to error out.
The working copy of JPMML-SkLearn already includes JPMML-Converter library version 1.2.4:
jpmml/jpmml-sklearn@79a4547
So, you need to wait a couple more days until SkLearn2PMML version 0.20.4 is released, which shall be based on the latest and greatest JPMML-SkLearn library version.
from sklearn2pmml.
Hi Villu,
yes is very odd!
In order to understand the issue i checked out JPMML-SkLearn to version 1.3.3 which depend of jpmml-converter-1.2.3 and te full test suite run green.
Then, I tried to export a PMML document using the converter-executable-1.3.3.jar produced in "target" with the following command and the tree was surprising right!
java -jar converter-executable-1.3.3.jar --pkl-pipeline-input ..\src\test\resources\pkl\GradientBoostingAudit.pkl --pmml-output GradientBoostingAudit.pmml
Could be the case that the jar included statically as jpmml-converter-1.2.3 in SkLearn2PMML was not generated from the right code base?
I'va have installed SkLearn2PMML using pip pointing to the git repository.
Thank you for the support!
from sklearn2pmml.
Could be the case that the jar included statically as jpmml-converter-1.2.3 in SkLearn2PMML was not generated from the right code base?
I've experienced a situation, where the resources
directory of an installed sklearn2pmml package contains several versions of the same library JAR file (eg. JPMML-Converter versions 1.2.0, 1.2.3). The JVM then adds the first out-of-date JAR file (eg. 1.2.0) to classpath, and ignores the second up-to-date JAR file (eg. 1.2.3). Such classpath conflicts may lead to all sorts of unexpected outcomes, starting with JVM class loader/verifier errors and ending with incorrectly generated PMML markup.
Could it be that you had multiple versions of the JPMML-Converter library in the resources
directory? This could happen if you install a new version of the sklearn2pmml package, without properly uninstalling the old version first.
Anyway, a good "fix" for library errors is to 1) delete the sklearn2pmml
subdirectory from the site-packages
directory of your active Python installation, and 2) install a the latest version of the sklearn2pmml package from GitHub.
from sklearn2pmml.
Could it be that you had multiple versions of the JPMML-Converter library in the resources directory? This could happen if you install a new version of the sklearn2pmml package, without properly uninstalling the old version first.
I think is not my case because i never installed before the package... BUT, In order to have locally this pull request (that you merged today) jpmml/jpmml-sklearn#46 I have put a recompiled version of the jpmml-sklearn
jar inside my resources
directory.
Could be this the root cause?
from sklearn2pmml.
I have put a recompiled version of the jpmml-sklearn jar inside my resources directory.
For documentation purposes, these are the steps for updating the JPMML-SkLearn dependency of the SkLearn2PMML package:
- Update JPMML-SkLearn version in
pom.xml
. When working with locally tweaked JPMML-SkLearn library, then the version identifier is typically1.3-SNAPSHOT
. - Manually delete all JAR files from the
/sklearn2pmml/resources
directory (only__init__.py
should remain). - Execute Apache Maven build
mvn clean package
. This will download the JPMML-SkLearn library, and all its transitive dependencies into the/sklearn2pmml/resources
directory. - Optionally, update the version identifier in
sklearn2pmml/metadata.py
. For example, introduce some sort of suffix to signal that this is a "tweaked" version, not an official version.
from sklearn2pmml.
Ok! Thank You.
from sklearn2pmml.
Related Issues (20)
- Storing LinearSVC as coefficients instead of support vectors HOT 1
- Reshape transformation results from 2-D to 1-D (column vectors) HOT 1
- sklearn2pmml does not work with sklearn version 1.3.0 and newer HOT 6
- sklearn2pmml does not work with xgboost >= 2.0.0 HOT 9
- LookupTransformer TypeError when default value is not exactly the type from the mapping HOT 2
- xgb 生成的pkl 转pmml 失败 HOT 1
- Can sklearn2pmml just for variable transformations be used? HOT 1
- PyPMML is making systematically off predictions with XGBoost PMML documents? HOT 16
- ImportError: cannot import name 'LabelBinarizer' from 'sklearn2pmml.preprocessing' HOT 2
- Compatibility with Scikit-Learn 1.4.0 HOT 8
- Convenience API for embedding model evaluation metrics as `ModelExplanation` element HOT 13
- Ability to "refine" (categorical-) valid value spaces along the transformer pipeline HOT 17
- NullPointerException when using OneHotEncoder with Integer Categorical Variables in sklearn2pmml HOT 10
- Create .pmml File for Calibrated xgboost Model HOT 8
- Pandas 2.2 FutureWarning for time series offset aliases HOT 2
- Pandas not installed as dependency HOT 2
- CategoricalDomain decorator doesn't work with nullable pandas Int64 column HOT 3
- RegEx expressions are un-evaluatable due to missing `(pc)re` imports HOT 8
- ExplainableBoostingRegressor not supporting other link functions HOT 1
- How to properly re-use raw features HOT 23
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sklearn2pmml.