Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AbstractMethodError: org.shaded.jpmml.evaluator.spark.PMMLTransformer #14

Closed
wobblyknees opened this issue Nov 14, 2017 · 1 comment
Closed

Comments

@wobblyknees
Copy link

I am getting the above exception when invoking the transform() method. I've shaded my jar (incl. relocation). Using Spark 2, jpmml-evaluator-spaprk "1.1-SNAPSHOT" version. I'm passing in a dataframe to transform(). Did I miss something?

Here's my code:
case class Attribute(ATTR1: Double, ATTR2:Double,ATTR3:Double, ATTR4:Double)
val ds = spark.read.option("header", "true").schema(StructType(Array(StructField("ATTR1", DoubleType, true),StructField("ATTR2", DoubleType, true),StructField("ATTR3", DoubleType, true),StructField("ATTR4", DoubleType, true)))).csv("my.csv").as[Attribute]

val file = new File(”mypmml.xml")
val evaluator = org.jpmml.evaluator.spark.EvaluatorUtil.createEvaluator(file)

val pmmlTransformerBuilder = new org.jpmml.evaluator.spark.TransformerBuilder(evaluator).withOutputCols
val pmmlTransformer = pmmlTransformerBuilder.build()
val output = pmmlTransformer.transform(ds)   // exception triggered here:

I get an exception on the last line:

Exception in thread "main" java.lang.AbstractMethodError: org.shaded.jpmml.evaluator.spark.PMMLTransformer.transform(Lorg/apache/spark/sql/Dataset;)Lorg/apache/spark/sql/Dataset;
at org.equifax.spark.pmml.examples.TestPMML$.main(TestPMML.scala:52)
at org.equifax.spark.pmml.examples.TestPMML.main(TestPMML.scala)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:755)
at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:180)
at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:205)
at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:119)
at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala)

@wobblyknees
Copy link
Author

I compiled the project with my own code and got past this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant