huaxingao commented on a change in pull request #27168: [SPARK-30377][ML] Make 
Regressors extend abstract class Regressor
URL: https://github.com/apache/spark/pull/27168#discussion_r365329045
 
 

 ##########
 File path: project/MimaExcludes.scala
 ##########
 @@ -469,7 +469,15 @@ object MimaExcludes {
     
ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.spark.deploy.SparkHadoopUtil.appendS3AndSparkHadoopConfigurations"),
 
     // [SPARK-29348] Add observable metrics.
-    
ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.spark.sql.streaming.StreamingQueryProgress.this")
+    
ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.spark.sql.streaming.StreamingQueryProgress.this"),
+
+    // [SPARK-30377][ML] Make AFTSurvivalRegression extend Regressor
+    
ProblemFilters.exclude[IncompatibleResultTypeProblem]("org.apache.spark.ml.regression.AFTSurvivalRegression.fit"),
+    
ProblemFilters.exclude[IncompatibleResultTypeProblem]("org.apache.spark.ml.regression.AFTSurvivalRegressionModel.setFeaturesCol"),
+    
ProblemFilters.exclude[IncompatibleResultTypeProblem]("org.apache.spark.ml.regression.AFTSurvivalRegressionModel.setPredictionCol"),
+    
ProblemFilters.exclude[IncompatibleResultTypeProblem]("org.apache.spark.ml.regression.AFTSurvivalRegression.setFeaturesCol"),
+    
ProblemFilters.exclude[IncompatibleResultTypeProblem]("org.apache.spark.ml.regression.AFTSurvivalRegression.setLabelCol"),
+    
ProblemFilters.exclude[IncompatibleResultTypeProblem]("org.apache.spark.ml.regression.AFTSurvivalRegression.setPredictionCol")
   )
 
 Review comment:
   Changing  hierarchy of 
```AFTSurvivalRegression/AFTSurvivalRegressionModel```from extending 
```Estimator/Model``` to ```Regressor/RegressionModel```  caused the following 
MiMa errors:
   ```
   [error]  * method 
setFeaturesCol(java.lang.String)org.apache.spark.ml.regression.AFTSurvivalRegressionModel
 in class org.apache.spark.ml.regression.AFTSurvivalRegressionModel has a 
different result type in current version, where it is 
org.apache.spark.ml.PredictionModel rather than 
org.apache.spark.ml.regression.AFTSurvivalRegressionModel
   [error]    filter with: 
ProblemFilters.exclude[IncompatibleResultTypeProblem]("org.apache.spark.ml.regression.AFTSurvivalRegressionModel.setFeaturesCol")
   [error]  * method 
setPredictionCol(java.lang.String)org.apache.spark.ml.regression.AFTSurvivalRegressionModel
 in class org.apache.spark.ml.regression.AFTSurvivalRegressionModel has a 
different result type in current version, where it is 
org.apache.spark.ml.PredictionModel rather than 
org.apache.spark.ml.regression.AFTSurvivalRegressionModel
   [error]    filter with: 
ProblemFilters.exclude[IncompatibleResultTypeProblem]("org.apache.spark.ml.regression.AFTSurvivalRegressionModel.setPredictionCol")
   [error]  * method 
fit(org.apache.spark.sql.Dataset)org.apache.spark.ml.regression.AFTSurvivalRegressionModel
 in class org.apache.spark.ml.regression.AFTSurvivalRegression has a different 
result type in current version, where it is org.apache.spark.ml.Model rather 
than org.apache.spark.ml.regression.AFTSurvivalRegressionModel
   [error]    filter with: 
ProblemFilters.exclude[IncompatibleResultTypeProblem]("org.apache.spark.ml.regression.AFTSurvivalRegression.fit")
   [error]  * method 
setFeaturesCol(java.lang.String)org.apache.spark.ml.regression.AFTSurvivalRegression
 in class org.apache.spark.ml.regression.AFTSurvivalRegression has a different 
result type in current version, where it is org.apache.spark.ml.Predictor 
rather than org.apache.spark.ml.regression.AFTSurvivalRegression
   [error]    filter with: 
ProblemFilters.exclude[IncompatibleResultTypeProblem]("org.apache.spark.ml.regression.AFTSurvivalRegression.setFeaturesCol")
   [error]  * method 
setLabelCol(java.lang.String)org.apache.spark.ml.regression.AFTSurvivalRegression
 in class org.apache.spark.ml.regression.AFTSurvivalRegression has a different 
result type in current version, where it is org.apache.spark.ml.Predictor 
rather than org.apache.spark.ml.regression.AFTSurvivalRegression
   [error]    filter with: 
ProblemFilters.exclude[IncompatibleResultTypeProblem]("org.apache.spark.ml.regression.AFTSurvivalRegression.setLabelCol")
   [error]  * method 
setPredictionCol(java.lang.String)org.apache.spark.ml.regression.AFTSurvivalRegression
 in class org.apache.spark.ml.regression.AFTSurvivalRegression has a different 
result type in current version, where it is org.apache.spark.ml.Predictor 
rather than org.apache.spark.ml.regression.AFTSurvivalRegression
   [error]    filter with: 
ProblemFilters.exclude[IncompatibleResultTypeProblem]("org.apache.spark.ml.regression.AFTSurvivalRegression.setPredictionCol")
   ```
   There is not any API change, though. 
   
   Changing the hierarchy of extending ```Predictor/PredictionModel``` to 
```Regressor/RegressionModel``` doesn't cause MiMa problem. 
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to