-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-15526][MLLIB] Shade JPMML #18584
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
Conversation
|
CC @vanzin for a look at the shading, as a sense check @vruusmann later I think we could update to JPMML 1.3 too. |
|
Good to know that there will be some relief coming in Apache Spark 2.3.X. I don't think that the shading will break any Spark application that depends on the I did rewrite the "Installation" section of the JPMML-SparkML project last week to bring more clarity to application classpath conflict resolution: https://github.com/jpmml/jpmml-sparkml#library |
|
Yes that's an important point I didn't mention. None of the shaded classes appear in any API, except |
|
Test build #79459 has finished for PR 18584 at commit
|
Hmm, I'd be more comfortable if one of you guys actually tested this to be true:
Because Scala traits are weird (bytecode is copied from the trait into the class that extends it), there could be dangling references to the non-shaded classes, even if those classes are not explicitly exposed in the trait. |
|
@vanzin I took this example: https://github.com/apache/spark/blob/master/examples/src/main/scala/org/apache/spark/examples/mllib/PMMLModelExportExample.scala which should exercise this code most directly, broke it out into a project and compiled it vs Spark 2.1.1. I then build Spark from this PR's branch, and ran the example locally with That's not an error between the app and Spark API but saying that the Spark code isn't finding the shaded JPMML that it is expecting to link against. |
|
Yeah, that points at some error with shading / packaging. Is that shaded class in any of the jars in |
|
Also, from the stack trace, the class that is extending |
|
Yeah, the Yes good point about |
|
I think the classes are missing because you haven't added the artifact to |
|
Scratch that. I got it working. I forgot to |
|
Test build #79571 has finished for PR 18584 at commit
|
dongjoon-hyun
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, LGTM, too.
|
Merging to master. |
What changes were proposed in this pull request?
Shade JPMML classes (
org.jpmml.**) and related PMML model classes (org.dmg.pmml.**). This insulates downstream users from the version of JPMML in Spark, allows us to upgrade more freely, and allows downstream users to use a different version. JPMML minor releases are not generally forwards/backwards compatible.How was this patch tested?
Existing tests