Closed riedel closed 4 years ago
At a minimum the message is very strange.
The org.jpmml.sparkml.PMMLBuilder
class defines two constructors - the real one, and another fake one, which is supposed to catch invalid PMMLBuilder
constructor invocations:
https://github.com/jpmml/jpmml-sparkml/blob/1.6.1/src/main/java/org/jpmml/sparkml/PMMLBuilder.java#L78-L85
Your code is invoking this fake constructor, even though you're actually supplying a real PipelineModel
object to it.
It's possible to invoke the fake constructor deliberatly by downcasting, but I doubt it's the case here:
PipelineModel pipelineModel = pipeline.fit(...);
PMMLBuilder pmmlBuilder = new PMMLBuilder((PipelineStage)pipelineModel);
Complete backtrace using sparklyr2pmml
What is your Apache Spark version, and Sparklyr2PMML/JPMML-SparkML versions?
Can you share a R code snippet that deals with PMML conversion?
Thanks for the explaination at least now I can make sense of it! I updated to version 1.6.1 (since I realized that sparklyR recently started to support Spark 3.0.0) and I haven't had the error since. (However it was also sporadic before using both 2.3 and 2.4 with 1.4.14 and 1.5.7 respectively). If I can reproduce it reliably I would reopen a ticket.
I get this error although I am able to score the model (thus it should be fitted). At a minimum the message is very strange.
Complete backtrace using sparklyrpmml: