[ https://issues.apache.org/jira/browse/SPARK-17139?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16340728#comment-16340728 ]
Nick Pentreath commented on SPARK-17139: ---------------------------------------- So, in terms of binary compat, the change itself here overall is ok as the traits are sealed and the concrete impl are private classes (or had private constructors in 2.2) However, in 2.2 and earlier versions, the only way to access the binary summary is through: {{ asInstanceOf[BinaryLogisticRegressionSummary]}} (as can be seen in {{LogisticRegressionSummaryExample}}). That same code if run in Spark 2.3 will throw an error, as follows: {code:java} $ ./bin/spark-submit --class org.apache.spark.examples.ml.LogisticRegressionSummaryExample PATH_TO_SPARK_2.2.0/examples/jars/spark-examples_2.11-2.2.0.jar ... Exception in thread "main" java.lang.IncompatibleClassChangeError: Found interface org.apache.spark.ml.classification.BinaryLogisticRegressionSummary, but class was expected at org.apache.spark.examples.ml.LogisticRegressionSummaryExample$.main(LogisticRegressionSummaryExample.scala:63) at org.apache.spark.examples.ml.LogisticRegressionSummaryExample.main(LogisticRegressionSummaryExample.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.JavaMainApplication.start(SparkApplication.scala:52) at org.apache.spark.deploy.SparkSubmit$.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:879) at org.apache.spark.deploy.SparkSubmit$.doRunMain$1(SparkSubmit.scala:197) at org.apache.spark.deploy.SparkSubmit$.submit(SparkSubmit.scala:227) at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:136) at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala){code} The above was run with Spark built from branch-2.3 @ {{c79e771f8952e6773c3a84cc617145216feddbcf}} So this does break binary compat. However I don't really see a good way to avoid this and the way it's been done cleans things up best. Since it's marked {{Experimental}} we can live with this, but will need to update SPARK-23112 with the details if all are in agreement. cc [~WeichenXu123] [~bago.amirbekian] [~sethah] [~josephkb] [~yanboliang] > Add model summary for MultinomialLogisticRegression > --------------------------------------------------- > > Key: SPARK-17139 > URL: https://issues.apache.org/jira/browse/SPARK-17139 > Project: Spark > Issue Type: Sub-task > Components: ML > Reporter: Seth Hendrickson > Assignee: Weichen Xu > Priority: Major > Fix For: 2.3.0 > > > Add model summary to multinomial logistic regression using same interface as > in other ML models. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org