You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by ru...@apache.org on 2026/10/15 11:41:01 UTC
(spark) branch branch-4.3 updated: [MINOR][ML] Correct KMeans.setIntermediateStorageLevel version metadata
This is an automated email from the ASF dual-hosted git repository.
zhengruifeng pushed a commit to branch branch-4.3
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-4.3 by this push:
new 66920b07f1bb [MINOR][ML] Correct KMeans.setIntermediateStorageLevel version metadata
66920b07f1bb is described below
commit 66920b07f1bbcda3aeed07cbcdd1a652594917d5
Author: Ruifeng Zheng <ru...@apache.org>
AuthorDate: Thu Oct 15 19:40:13 2026 +0800
[MINOR][ML] Correct KMeans.setIntermediateStorageLevel version metadata
### What changes were proposed in this pull request?
Correct the Scala `Since` and Python `since` annotations on `KMeans.setIntermediateStorageLevel` from `5.0.0` to `4.3.0`.
### Why are the changes needed?
The setter is already included in Spark 4.3.0 RC2, but its version metadata incorrectly says it was introduced in 5.0.0. It is absent from the Spark 4.2.0 Scala and Python sources.
Please also backport this metadata correction to `branch-4.3`.
### Does this PR introduce _any_ user-facing change?
No. This only corrects API documentation metadata.
### How was this patch tested?
Verified the setter against the `v4.2.0` and `v4.3.0-rc2` sources, checked that both updated annotations identify `4.3.0`, parsed the Python module with `ast.parse`, and ran `git diff --check`. Unit tests were not added or run because executable behavior is unchanged.
### Was this patch authored or co-authored using generative AI tooling?
Generated-by: OpenAI Codex (GPT-6)
Closes #59500 from zhengruifeng/ml-kmeans-since-430-dev-5.
Authored-by: Ruifeng Zheng <ru...@apache.org>
Signed-off-by: Ruifeng Zheng <ru...@apache.org>
(cherry picked from commit d213c88ac4b89a74f9bb695db127f3a7d35303f3)
Signed-off-by: Ruifeng Zheng <ru...@apache.org>
---
mllib/src/main/scala/org/apache/spark/ml/clustering/KMeans.scala | 2 +-
python/pyspark/ml/clustering.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/mllib/src/main/scala/org/apache/spark/ml/clustering/KMeans.scala b/mllib/src/main/scala/org/apache/spark/ml/clustering/KMeans.scala
index 243077374296..c8284578f13d 100644
--- a/mllib/src/main/scala/org/apache/spark/ml/clustering/KMeans.scala
+++ b/mllib/src/main/scala/org/apache/spark/ml/clustering/KMeans.scala
@@ -442,7 +442,7 @@ class KMeans @Since("1.5.0") (
def setMaxBlockSizeInMB(value: Double): this.type = set(maxBlockSizeInMB, value)
/** @group expertSetParam */
- @Since("5.0.0")
+ @Since("4.3.0")
def setIntermediateStorageLevel(value: String): this.type = set(intermediateStorageLevel, value)
@Since("2.0.0")
diff --git a/python/pyspark/ml/clustering.py b/python/pyspark/ml/clustering.py
index ba3e486cb4ef..c23cd238d32e 100644
--- a/python/pyspark/ml/clustering.py
+++ b/python/pyspark/ml/clustering.py
@@ -923,7 +923,7 @@ class KMeans(JavaEstimator[KMeansModel], _KMeansParams, JavaMLWritable, JavaMLRe
"""
return self._set(maxBlockSizeInMB=value)
- @since("5.0.0")
+ @since("4.3.0")
def setIntermediateStorageLevel(self, value: str) -> "KMeans":
"""
Sets the value of :py:attr:`intermediateStorageLevel`.
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org