autodeployai / pmml4s-spark Goto Github PK
View Code? Open in Web Editor NEWPMML scoring library for Spark as SparkML Transformer
License: Apache License 2.0
PMML scoring library for Spark as SparkML Transformer
License: Apache License 2.0
Our team is utilizing pmml4s-spark for the past couple of years. We wanted to update our current version 0.9.3 to 0.9.16 and I wanted to know what are the added features and enhancements made.
Hi! I'm trying to use AWS EMR to score a Dataframe using a pmml model, but got error that is not explicit to trace. Any help would be appredicated.
Read the dataframe:
val df = spark.read.parquet("myDataframe.parquet")
df.show()
works fine.
Read the pmml model:
val model = ScoreModel.fromFile("myxgboostModel.pmml")
Then run the following code:
model.transform(df).show()
Gave an error message:
java.lang.ClassCastException: cannot assign instance of scala.collection.immutable.List$SerializationProxy to field org.apache.spark.rdd.RDD.org$apache$spark$rdd$RDD$$dependencies_ of type scala.collection.Seq in instance of org.apache.spark.rdd.MapPartitionsRDD
Environment: Spark 2.4.4, Zeppelin 0.8.2.
However, I didn't meet this error when I was coding with Intellij on my macbook.
The method java.lang.NoSuchMethodError: org.apache.spark.sql.types.StructType.names() is introduced in spark 2.4.3 .so it is not compatible with lower version of spark.
Receiving below error with spark version 2.3
scala> val score=model.transform(df)
java.lang.NoSuchMethodError: org.apache.spark.sql.types.StructType.names()[Ljava/lang/String;
at org.pmml4s.spark.ScoreModel.transform(ScoreModel.scala:56)
... 51 elided
Also, need to know what all dependent jars should be imported to score a model in spark-scala?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.