This is an automated email from the ASF dual-hosted git repository. dongjoon pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/master by this push: new a5e741e60ac9 [SPARK-47011][MLLIB] Remove deprecated `BinaryClassificationMetrics.scoreLabelsWeight` a5e741e60ac9 is described below commit a5e741e60ac97a395ce80d9fb39709e143ada721 Author: Dongjoon Hyun <dh...@apple.com> AuthorDate: Thu Feb 8 10:59:17 2024 -0800 [SPARK-47011][MLLIB] Remove deprecated `BinaryClassificationMetrics.scoreLabelsWeight` ### What changes were proposed in this pull request? This PR aims to a planned removal of the deprecated `BinaryClassificationMetrics.scoreLabelsWeight`. ### Why are the changes needed? Apache Spark 3.4.0 deprecated this via SPARK-39533 and announced the removal of this. - #36926 https://github.com/apache/spark/blob/b7edc5fac0f4e479cbc869d54a9490c553ba2613/mllib/src/main/scala/org/apache/spark/mllib/evaluation/BinaryClassificationMetrics.scala#L49-L50 ### Does this PR introduce _any_ user-facing change? Yes, but this is a planned change. ### How was this patch tested? Pass the CIs. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #45070 from dongjoon-hyun/SPARK-47011. Authored-by: Dongjoon Hyun <dh...@apple.com> Signed-off-by: Dongjoon Hyun <dh...@apple.com> --- .../apache/spark/mllib/evaluation/BinaryClassificationMetrics.scala | 4 +--- project/MimaExcludes.scala | 4 +++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/mllib/src/main/scala/org/apache/spark/mllib/evaluation/BinaryClassificationMetrics.scala b/mllib/src/main/scala/org/apache/spark/mllib/evaluation/BinaryClassificationMetrics.scala index a74800f7b189..869fe7155a26 100644 --- a/mllib/src/main/scala/org/apache/spark/mllib/evaluation/BinaryClassificationMetrics.scala +++ b/mllib/src/main/scala/org/apache/spark/mllib/evaluation/BinaryClassificationMetrics.scala @@ -46,9 +46,7 @@ class BinaryClassificationMetrics @Since("3.0.0") ( @Since("1.3.0") val numBins: Int = 1000) extends Logging { - @deprecated("The variable `scoreLabelsWeight` should be private and " + - "will be removed in 4.0.0.", "3.4.0") - val scoreLabelsWeight: RDD[(Double, (Double, Double))] = scoreAndLabels.map { + private val scoreLabelsWeight: RDD[(Double, (Double, Double))] = scoreAndLabels.map { case (prediction: Double, label: Double, weight: Double) => require(weight >= 0.0, s"instance weight, $weight has to be >= 0.0") (prediction, (label, weight)) diff --git a/project/MimaExcludes.scala b/project/MimaExcludes.scala index 64c5599919a6..5674eba0bea0 100644 --- a/project/MimaExcludes.scala +++ b/project/MimaExcludes.scala @@ -77,7 +77,9 @@ object MimaExcludes { // SPARK-46410: Assign error classes/subclasses to JdbcUtils.classifyException ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.spark.sql.jdbc.JdbcDialect.classifyException"), // [SPARK-464878][CORE][SQL] (false alert). Invalid rule for StringType extension. - ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.spark.sql.types.StringType.this") + ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.spark.sql.types.StringType.this"), + // SPARK-47011: Remove deprecated BinaryClassificationMetrics.scoreLabelsWeight + ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.spark.mllib.evaluation.BinaryClassificationMetrics.scoreLabelsWeight") ) // Default exclude rules --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org