Closed wzymmzs closed 4 years ago
Spark version is 3.0.0-SNAPSHOT. jpmml-sparkml maven version is 1.5.4.
I'm trying to use ConverterUtil.toPMML in spark-ml example
Class org.jpmml.sparkml.ConverterUtil
has been thoroughly deprecated, and you shouldn't be using any of its utility methods in your application code. Please switch to the org.jpmml.sparkml.PMMLBuilder
component instead.
Spark version is 3.0.0-SNAPSHOT jpmml-sparkml maven version is 1.5.4
The JPMML-SparkML library hasn't been ported to the Apache Spark 3.0 version yet.
I'm waiting for the official 3.0.0 release to happen.
I think ConverterUtil allows PipelineStages extends Transformer, but OneHotEncoder extends Estimator still in the properties. Is this the cause of the error?
Correct.
But I still don't understand why Estimator cannot be parsed to a PMML modle?
Reopening, because this issue is not solved yet!
But I still don't understand why Estimator cannot be parsed to a PMML modle?
The JPMML-SparkML library expects Apache Spark class hierarchy to have a specific structure/layout when mapping transformer/model classes to converter classes. Looks like the class hierarchy has been seriously reorganized between Apache Spark 2.4 and 3.0 versions.
I'm trying to use
ConverterUtil.toPMML
in spark-ml exampleJavaDecisionTreeClassificationExample
, but I get ajava.lang.IllegalArgumentException
error.I find there is
org.apache.spark.ml.feature.OneHotEncoder
insparkml2pmml.properties
. But when the code running aterrors happened:
I think
ConverterUtil
allowsPipelineStages
extendsTransformer
, butOneHotEncoder
extendsEstimator
still in the properties. Is this the cause of the error?