This is an automated email from the ASF dual-hosted git repository.
zhengruifeng pushed a commit to branch branch-4.x
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-4.x by this push:
new 668726bc00c9 [SPARK-60506][ML][DOC] Remove the false promise that
deprecated StringIndexerModel.labels will be removed in 3.1.0
668726bc00c9 is described below
commit 668726bc00c9e27e758d72338e85c9848047bad0
Author: Ruifeng Zheng <[email protected]>
AuthorDate: Thu Nov 5 21:13:17 2026 +0800
[SPARK-60506][ML][DOC] Remove the false promise that deprecated
StringIndexerModel.labels will be removed in 3.1.0
### What changes were proposed in this pull request?
Removes the false removal promise from the deprecation of
`StringIndexerModel.labels`. The current message says the API "will be removed
in 3.1.0". That version has already passed and the API has not been removed.
The PR rewords the message and the ML migration guide entry to say only that
the API is deprecated, with no removal promise.
No API or behavior changes.
### Why are the changes needed?
A removal version that has passed, with no removal, misleads users about
whether the API still exists and when it will go. The API is still deprecated.
The message makes no removal promise.
### Does this PR introduce _any_ user-facing change?
Only the text of the deprecation message and the migration guide.
### How was this patch tested?
No tests added. No existing test matches the old message text. The changed
Scala line is within the 100-character limit and contains only ASCII
characters. The change is to the string argument of a `deprecated` annotation.
### Was this patch authored or co-authored using generative AI tooling?
Generated-by: Claude (system.ai.claude-haiku-5-5) via Claude Code
This pull request and its description were written by Isaac.
Closes #59638 from zhengruifeng/deprecation-will-be-removed-msg.
Authored-by: Ruifeng Zheng <[email protected]>
Signed-off-by: Ruifeng Zheng <[email protected]>
(cherry picked from commit 5ca2b2dbd4c37fb56730a6bd9ed412096151981a)
Signed-off-by: Ruifeng Zheng <[email protected]>
skip-checks: true
---
docs/ml-migration-guide.md | 2 +-
mllib/src/main/scala/org/apache/spark/ml/feature/StringIndexer.scala | 3 +--
python/pyspark/ml/feature.py | 2 +-
3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/docs/ml-migration-guide.md b/docs/ml-migration-guide.md
index fe5bdc4aedbc..23f69ddf93f6 100644
--- a/docs/ml-migration-guide.md
+++ b/docs/ml-migration-guide.md
@@ -77,7 +77,7 @@ There are no deprecations.
**Deprecations**
* [SPARK-11215](https://issues.apache.org/jira/browse/SPARK-11215):
-`labels` in `StringIndexerModel` is deprecated and will be removed in 3.1.0.
Use `labelsArray` instead.
+`labels` in `StringIndexerModel` is deprecated. Use `labelsArray` instead.
* [SPARK-25758](https://issues.apache.org/jira/browse/SPARK-25758):
`computeCost` in `BisectingKMeansModel` is deprecated and will be removed in
future versions. Use `ClusteringEvaluator` instead.
diff --git
a/mllib/src/main/scala/org/apache/spark/ml/feature/StringIndexer.scala
b/mllib/src/main/scala/org/apache/spark/ml/feature/StringIndexer.scala
index c363d3ca2f32..9295ac9b2e01 100644
--- a/mllib/src/main/scala/org/apache/spark/ml/feature/StringIndexer.scala
+++ b/mllib/src/main/scala/org/apache/spark/ml/feature/StringIndexer.scala
@@ -307,8 +307,7 @@ class StringIndexerModel (
// For ml connect only
private[ml] def this() = this("", Array.empty[Array[String]])
- @deprecated("`labels` is deprecated and will be removed in 3.1.0. Use
`labelsArray` " +
- "instead.", "3.0.0")
+ @deprecated("Use `labelsArray` instead.", "3.0.0")
@Since("1.5.0")
def labels: Array[String] = {
require(labelsArray.length == 1, "This StringIndexerModel is fit on
multiple columns. " +
diff --git a/python/pyspark/ml/feature.py b/python/pyspark/ml/feature.py
index 4167249afaa8..0e1414f20dc3 100755
--- a/python/pyspark/ml/feature.py
+++ b/python/pyspark/ml/feature.py
@@ -4896,7 +4896,7 @@ class StringIndexerModel(
Ordered list of labels, corresponding to indices to be assigned.
.. deprecated:: 3.1.0
- It will be removed in future versions. Use `labelsArray` method
instead.
+ Use `labelsArray` method instead.
"""
return self._call_java("labels")
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]