Comments (2)
SEVERE: Failed to parse PKL net.razorvine.pickle.InvalidOpcodeException: invalid pickle opcode: 248
JPMML-SkLearn depends on the Pyrolite library for low-level PKL file parsing functionality. Apparently, Pyrolite does not recognize Pickle protocol opcode 248
(hex 0xf8
).
I can't find the definition of this opcode in Python 3.6 codebase:
https://github.com/python/cpython/blob/3.6/Lib/pickle.py#L102-L179
Could you give me pointers on where I might be looking to solve this error?
The stack trace of this exception points at method net.razorvine.pickle.Unpikcler#dispatch(short)
. You could try addinng a case
statement for opcode 248 there, and collect more information about it (eg. which Scikit-Learn class, which class attribute, etc.). Then, try to factor a minimal reproducible example, and open a parallel issue with the Pyrolite project: https://github.com/irmen/Pyrolite/issues
The JPMML-SkLearn project includes an integration test for the IsolationForest
model type:
https://github.com/jpmml/jpmml-sklearn/blob/master/src/test/resources/pkl/IsolationForestHousingAnomaly.pkl
This PKL file was generated using Python 3.4(.3). So, downgrading from Python 3.6 to 3.4 may provide a temporary workaround.
from sklearn2pmml.
Thanks for the quick update.
I ran the code with python 3.4 and I have it confirmed working ! You are great man !
When running your debug pointer I noticed that all tree models are affected, but others not.
For now I'll use python 3.4 as a workaround and I'll close the Issue.
Thanks again.
from sklearn2pmml.
Related Issues (20)
- Post Process the multiple outputs of random forest regressor HOT 4
- Verification of multi-output models HOT 2
- Specifying the number and name of target fields HOT 2
- Discrepancy with xgboost + TFIDF on prediction between Python and Java HOT 3
- The estimator object of the final step (Python class sklearn.svm._classes.SVR) does not specify the number of outputs HOT 1
- The estimator object of the final step (Python class sklearn.svm._classes.SVR) does not specify the number of outputs HOT 2
- Does pipleline support custom fit_transform? HOT 1
- Sklearn2pmml can't handle custom function or lambda functions? HOT 29
- The trained model is transformed into pmml, but the prediction results are inconsistent HOT 5
- Conversion error: "the estimator object does not specify the number of outputs" HOT 3
- Is there a way to combine multiple models into a single pmml file? HOT 3
- Renaming multiple columns with the `Alias` decorator HOT 4
- Using `ExpressionTransformer` for column selection
- API for customizing `OutputField` names HOT 3
- PMML target output from float to double precision HOT 2
- Function "stringLength" is not defined HOT 2
- Fail to create pmml when `expr` of `ExpressionTransformer` is a function HOT 6
- The `StringNormalizer` transformer should perform input validation HOT 9
- ExpressionTransformer : Name 'X' refers to a row vector. HOT 7
- Excuse me, can I convert the vgg .pkl trained by pytroch to pmml format through sklean2pmml HOT 1
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.