jpmml / sklearn2pmml

Python library for converting Scikit-Learn pipelines to PMML
GNU Affero General Public License v3.0
685 stars 113 forks source link

Called Process Error #26

Closed khatriindu closed 7 years ago

khatriindu commented 7 years ago

I keep getting the error message below when I try to convert a fitted pipeline to a PMML file.


CalledProcessError Traceback (most recent call last)

in () 13 from sklearn2pmml import sklearn2pmml 14 ---> 15 sklearn2pmml(iris_pipeline, "DecisionTreeIris.pmml", with_repr = True) C:\Users\dla805\AppData\Roaming\Python\Python35\site-packages\sklearn2pmml\__init__.py in sklearn2pmml(pipeline, pmml, user_classpath, with_repr, debug) 130 if(debug): 131 print(" ".join(cmd)) --> 132 subprocess.check_call(cmd) 133 finally: 134 if(debug): C:\Users\dla805\AppData\Local\Continuum\Anaconda3\lib\subprocess.py in check_call(*popenargs, **kwargs) 579 if cmd is None: 580 cmd = popenargs[0] --> 581 raise CalledProcessError(retcode, cmd) 582 return 0 583 CalledProcessError: Command '['java', '-cp', 'C:\\Users\\dla805\\AppData\\Roaming\\Python\\Python35\\site-packages\\sklearn2pmml\\resources\\guava-19.0.jar;C:\\Users\\dla805\\AppData\\Roaming\\Python\\Python35\\site-packages\\sklearn2pmml\\resources\\istack-commons-runtime-2.21.jar;C:\\Users\\dla805\\AppData\\Roaming\\Python\\Python35\\site-packages\\sklearn2pmml\\resources\\jaxb-core-2.2.11.jar;C:\\Users\\dla805\\AppData\\Roaming\\Python\\Python35\\site-packages\\sklearn2pmml\\resources\\jaxb-runtime-2.2.11.jar;C:\\Users\\dla805\\AppData\\Roaming\\Python\\Python35\\site-packages\\sklearn2pmml\\resources\\jcommander-1.48.jar;C:\\Users\\dla805\\AppData\\Roaming\\Python\\Python35\\site-packages\\sklearn2pmml\\resources\\jpmml-converter-1.2.1.jar;C:\\Users\\dla805\\AppData\\Roaming\\Python\\Python35\\site-packages\\sklearn2pmml\\resources\\jpmml-lightgbm-1.0.2.jar;C:\\Users\\dla805\\AppData\\Roaming\\Python\\Python35\\site-packages\\sklearn2pmml\\resources\\jpmml-sklearn-1.2.6.jar;C:\\Users\\dla805\\AppData\\Roaming\\Python\\Python35\\site-packages\\sklearn2pmml\\resources\\jpmml-xgboost-1.1.5.jar;C:\\Users\\dla805\\AppData\\Roaming\\Python\\Python35\\site-packages\\sklearn2pmml\\resources\\pmml-agent-1.3.4.jar;C:\\Users\\dla805\\AppData\\Roaming\\Python\\Python35\\site-packages\\sklearn2pmml\\resources\\pmml-model-1.3.4.jar;C:\\Users\\dla805\\AppData\\Roaming\\Python\\Python35\\site-packages\\sklearn2pmml\\resources\\pmml-model-metro-1.3.4.jar;C:\\Users\\dla805\\AppData\\Roaming\\Python\\Python35\\site-packages\\sklearn2pmml\\resources\\pmml-schema-1.3.4.jar;C:\\Users\\dla805\\AppData\\Roaming\\Python\\Python35\\site-packages\\sklearn2pmml\\resources\\pyrolite-4.16.jar;C:\\Users\\dla805\\AppData\\Roaming\\Python\\Python35\\site-packages\\sklearn2pmml\\resources\\serpent-1.16.jar;C:\\Users\\dla805\\AppData\\Roaming\\Python\\Python35\\site-packages\\sklearn2pmml\\resources\\slf4j-api-1.7.22.jar;C:\\Users\\dla805\\AppData\\Roaming\\Python\\Python35\\site-packages\\sklearn2pmml\\resources\\slf4j-jdk14-1.7.22.jar', 'org.jpmml.sklearn.Main', '--pkl-pipeline-input', 'C:\\Users\\dla805\\AppData\\Local\\Temp\\pipeline-xpbmt8jp.pkl.z', '--repr-pipeline', "PMMLPipeline(steps=[('classifier', DecisionTreeClassifier(class_weight=None, criterion='gini', max_depth=None,\n max_features=None, max_leaf_nodes=None,\n min_impurity_split=1e-07, min_samples_leaf=1,\n min_samples_split=2, min_weight_fract
vruusmann commented 7 years ago

I have no idea what is going on, because your error report doesn't contain any information about the underlying Java exception.

This Java exception is printed to the console, right above the Python traceback information. It should start with java.lang.IllegalArgumentException (or something very similar), followed by ten or more lines that start with at:.

Also, please see this SO answer for a bit of background: http://stackoverflow.com/a/41701701/1808924