Closed FidelCastillo closed 8 years ago
Your gbm
object contains a R bytecode snippet, which in turn contains a special list. The RDS parser hasn't been introduced to such data structure, hence the exception.
This problem can only be solved by analyzing the problematic gbm
object locally. Can you reproduce this exception with toy datasets such as Audit-Adjusted
or Iris-Species
(classification), or Auto-mpg
(regression)? In what way is your GBM training procedure different from the one that is used in JPMML-R GBM integration tests: https://github.com/jpmml/jpmml-r/blob/master/src/test/R/gbm.R
thank you for your reply.
We convert a rxBTree from REE to a GBM object, thats why we get the issue.
We though that the transformation could work but look like it doesn't.
I will try to reproduce the model with the toy dataset and check if that could have an easy solution.
Thank you again for your help
Indeed, the use of rxBTrees()
function is most probably the cause of this RDS parser exception. Looks like this function is part of REE offering, so I have no chance of debugging it on my own.
As a workaround, you could try nullifying the "secondary attributes" of the rxBTree
object one-by-one, and re-trying the conversion. The idea is that once you nullify the offending R bytecode/scpecial list attribute, the rest of the conversion should proceed normally.
How big is the rxBTree
object? Can you share it with me privately?
I just run a toy example, if you want I can send you privately the toy object.
we saw some diffrences in the model's terms
It doesn't matter what dataset you use for training. The important thing is that the resulting rxBTree
object must be "broken" in a way as shown in the first comment.
Send it to my e-mail (as shown in profile) and I'll take care of the rest.
Hi,
we are using r2pmml with a gbm model and we get this issue:
`r2pmml(gbm_out, "gbm.pmml") abr 26, 2016 11:14:34 AM org.jpmml.rexp.Main run INFORMACIÓN: Parsing RDS.. abr 26, 2016 11:15:10 AM org.jpmml.rexp.Main run GRAVE: Failed to parse RDS java.lang.UnsupportedOperationException: 6 at org.jpmml.rexp.RExpParser.readBytecodeConstants(RExpParser.java:377) at org.jpmml.rexp.RExpParser.readBC1(RExpParser.java:365) at org.jpmml.rexp.RExpParser.readBytecode(RExpParser.java:336) at org.jpmml.rexp.RExpParser.readRExp(RExpParser.java:98) at org.jpmml.rexp.RExpParser.readClosure(RExpParser.java:177) at org.jpmml.rexp.RExpParser.readRExp(RExpParser.java:78) at org.jpmml.rexp.RExpParser.readPairList(RExpParser.java:152) at org.jpmml.rexp.RExpParser.readRExp(RExpParser.java:76) at org.jpmml.rexp.RExpParser.readVector(RExpParser.java:323) at org.jpmml.rexp.RExpParser.readRExp(RExpParser.java:96) at org.jpmml.rexp.RExpParser.readEnvironment(RExpParser.java:193) at org.jpmml.rexp.RExpParser.readRExp(RExpParser.java:80) at org.jpmml.rexp.RExpParser.readEnvironment(RExpParser.java:191) at org.jpmml.rexp.RExpParser.readRExp(RExpParser.java:80) at org.jpmml.rexp.RExpParser.readEnvironment(RExpParser.java:191) at org.jpmml.rexp.RExpParser.readRExp(RExpParser.java:80) at org.jpmml.rexp.RExpParser.readEnvironment(RExpParser.java:191) at org.jpmml.rexp.RExpParser.readRExp(RExpParser.java:80) at org.jpmml.rexp.RExpParser.readVector(RExpParser.java:323) at org.jpmml.rexp.RExpParser.readRExp(RExpParser.java:96) at org.jpmml.rexp.RExpParser.readVector(RExpParser.java:323) at org.jpmml.rexp.RExpParser.readRExp(RExpParser.java:96) at org.jpmml.rexp.RExpParser.readPairList(RExpParser.java:152) at org.jpmml.rexp.RExpParser.readRExp(RExpParser.java:76) at org.jpmml.rexp.RExpParser.readEnvironment(RExpParser.java:192) at org.jpmml.rexp.RExpParser.readRExp(RExpParser.java:80) at org.jpmml.rexp.RExpParser.readPairList(RExpParser.java:152) at org.jpmml.rexp.RExpParser.readRExp(RExpParser.java:76) at org.jpmml.rexp.RExpParser.readAttributes(RExpParser.java:432) at org.jpmml.rexp.RExpParser.readFunctionCall(RExpParser.java:211) at org.jpmml.rexp.RExpParser.readRExp(RExpParser.java:84) at org.jpmml.rexp.RExpParser.readVector(RExpParser.java:323) at org.jpmml.rexp.RExpParser.readRExp(RExpParser.java:96) at org.jpmml.rexp.RExpParser.parse(RExpParser.java:55) at org.jpmml.rexp.Main.run(Main.java:109) at org.jpmml.rexp.Main.main(Main.java:97)
Exception in thread "main" java.lang.UnsupportedOperationException: 6 at org.jpmml.rexp.RExpParser.readBytecodeConstants(RExpParser.java:377) at org.jpmml.rexp.RExpParser.readBC1(RExpParser.java:365) at org.jpmml.rexp.RExpParser.readBytecode(RExpParser.java:336) at org.jpmml.rexp.RExpParser.readRExp(RExpParser.java:98) at org.jpmml.rexp.RExpParser.readClosure(RExpParser.java:177) at org.jpmml.rexp.RExpParser.readRExp(RExpParser.java:78) at org.jpmml.rexp.RExpParser.readPairList(RExpParser.java:152) at org.jpmml.rexp.RExpParser.readRExp(RExpParser.java:76) at org.jpmml.rexp.RExpParser.readVector(RExpParser.java:323) at org.jpmml.rexp.RExpParser.readRExp(RExpParser.java:96) at org.jpmml.rexp.RExpParser.readEnvironment(RExpParser.java:193) at org.jpmml.rexp.RExpParser.readRExp(RExpParser.java:80) at org.jpmml.rexp.RExpParser.readEnvironment(RExpParser.java:191) at org.jpmml.rexp.RExpParser.readRExp(RExpParser.java:80) at org.jpmml.rexp.RExpParser.readEnvironment(RExpParser.java:191) at org.jpmml.rexp.RExpParser.readRExp(RExpParser.java:80) at org.jpmml.rexp.RExpParser.readEnvironment(RExpParser.java:191) at org.jpmml.rexp.RExpParser.readRExp(RExpParser.java:80) at org.jpmml.rexp.RExpParser.readVector(RExpParser.java:323) at org.jpmml.rexp.RExpParser.readRExp(RExpParser.java:96) at org.jpmml.rexp.RExpParser.readVector(RExpParser.java:323) at org.jpmml.rexp.RExpParser.readRExp(RExpParser.java:96) at org.jpmml.rexp.RExpParser.readPairList(RExpParser.java:152) at org.jpmml.rexp.RExpParser.readRExp(RExpParser.java:76) at org.jpmml.rexp.RExpParser.readEnvironment(RExpParser.java:192) at org.jpmml.rexp.RExpParser.readRExp(RExpParser.java:80) at org.jpmml.rexp.RExpParser.readPairList(RExpParser.java:152) at org.jpmml.rexp.RExpParser.readRExp(RExpParser.java:76) at org.jpmml.rexp.RExpParser.readAttributes(RExpParser.java:432) at org.jpmml.rexp.RExpParser.readFunctionCall(RExpParser.java:211) at org.jpmml.rexp.RExpParser.readRExp(RExpParser.java:84) at org.jpmml.rexp.RExpParser.readVector(RExpParser.java:323) at org.jpmml.rexp.RExpParser.readRExp(RExpParser.java:96) at org.jpmml.rexp.RExpParser.parse(RExpParser.java:55) at org.jpmml.rexp.Main.run(Main.java:109) at org.jpmml.rexp.Main.main(Main.java:97) Error in .convert(tempfile, file, ...) : 1 In addition: Warning message: running command '"java" -cp "C:/Users/jrdiaz/Documents/R/win-library/3.2/r2pmml/java/guava-19.0.jar;C:/Users/jrdiaz/Documents/R/win-library/3.2/r2pmml/java/istack-commons-runtime-2.21.jar;C:/Users/jrdiaz/Documents/R/win-library/3.2/r2pmml/java/jaxb-core-2.2.11.jar;C:/Users/jrdiaz/Documents/R/win-library/3.2/r2pmml/java/jaxb-runtime-2.2.11.jar;C:/Users/jrdiaz/Documents/R/win-library/3.2/r2pmml/java/jcommander-1.48.jar;C:/Users/jrdiaz/Documents/R/win-library/3.2/r2pmml/java/jpmml-converter-1.0.3.jar;C:/Users/jrdiaz/Documents/R/win-library/3.2/r2pmml/java/jpmml-r-1.1.4.jar;C:/Users/jrdiaz/Documents/R/win-library/3.2/r2pmml/java/jpmml-xgboost-1.0.2.jar;C:/Users/jrdiaz/Documents/R/win-library/3.2/r2pmml/java/pmml-agent-1.2.11.jar;C:/Users/jrdiaz/Documents/R/win-library/3.2/r2pmml/java/pmml-model-1.2.11.jar;C:/Users/jrdiaz/Documents/R/win-library/3.2/r2pmml/java/pmml-model-metro-1.2.11.jar;C:/Users/jrdiaz/Documents/R/win-library/3.2/r2pmml/java/pmml-schema-1.2.11.jar;C:/Users/jrdiaz/Document [... truncated] `
Thank you for your work in this fantastic tool