jpmml / r2pmml

R library for converting R models to PMML
GNU Affero General Public License v3.0
73 stars 18 forks source link

Error generating PMML from xgboost model #33

Closed rwking closed 6 years ago

rwking commented 6 years ago

Hello,

I'm not sure if this is an issue with the r2pmml package, but I've tried troubleshooting my Java installation without any luck.

I'm trying to generate a pmml file from an xgboost model. I get the below error message when I try and I also get it when I run the sample code below.

library("ranger")
library("r2pmml")
data(iris)

iris.ranger = ranger(Species ~ ., data = iris, num.trees = 7, write.forest = TRUE)
print(iris.ranger)

r2pmml(iris.ranger, "iris_ranger.pmml", dataset = iris)

When executing this, I get the following error:

Error in .convert(tempfile, file, converter, converter_classpath, verbose) : 
  127
In addition: Warning message:
running command '"java" -cp "C:/Users/rking/Documents/R/win-library/3.3/r2pmml/java/guava-20.0.jar
C:/Users/rking/Documents/R/win-library/3.3/r2pmml/java/istack-commons-runtime-3.0.5.jar
C:/Users/rking/Documents/R/win-library/3.3/r2pmml/java/jaxb-core-2.3.0.jar
C:/Users/rking/Documents/R/win-library/3.3/r2pmml/java/jaxb-runtime-2.3.0.jar
C:/Users/rking/Documents/R/win-library/3.3/r2pmml/java/jcommander-1.48.jar
C:/Users/rking/Documents/R/win-library/3.3/r2pmml/java/jpmml-converter-1.2.6.jar
C:/Users/rking/Documents/R/win-library/3.3/r2pmml/java/jpmml-r-1.2.20.jar
C:/Users/rking/Documents/R/win-library/3.3/r2pmml/java/jpmml-xgboost-1.2.3.jar
C:/Users/rking/Documents/R/win-library/3.3/r2pmml/java/pmml-agent-1.3.8.jar
C:/Users/rking/Documents/R/win-library/3.3/r2pmml/java/pmml-model-1.3.8.jar
C:/Users/rking/Documents/R/win-library/3.3/r2pmml/java/pmml-model-metro-1.3.8.jar
C:/Users/rking/Documents/R/win-library/3.3/r2pmml/java/pmml-schema-1.3.8.jar
C:/Users/rking/Documents/R/win-library/3... <truncated>

Any help would be greatly appreciated. Thank you for developing this wonderful package.

Rich

vruusmann commented 6 years ago

I get the below error message when I run the sample code below.

The provided sample code works beautifully on my computer. So, as you already suspect, there's something wrong with your computer (eg. the Java installation).

When executing this, I get the following error:

The detailed exception message appears to have been truncated. You should (re-)configure your R runtime to display exception messages in full length. Alternatively, you might try running the problematic R code using the vanilla R command-line executable, and capturing its standard error and output streams to a new file (and then paste its contents here).

R2PMML/JPMML-R require Java 1.7 or newer (that's a fairly lax requirement, given that almost all people are using Java 1.8 these days). What's your Java version?

vruusmann commented 6 years ago

Closing as invalid.