Skip to content

Conversation

@yanboliang
Copy link
Contributor

@yanboliang yanboliang commented Apr 22, 2016

What changes were proposed in this pull request?

We deprecated runs of mllib.KMeans in Spark 1.6 (SPARK-11358). In 2.0, we will make it no effect (with warning messages). We did not remove setRuns/getRuns for better binary compatibility.
This PR change runs which are appeared at the public API. Usage inside of KMeans.runAlgorithm() will be resolved at #10806.

How was this patch tested?

Existing unit tests.

cc @jkbradley

@SparkQA
Copy link

SparkQA commented Apr 22, 2016

Test build #56695 has finished for PR 12608 at commit ffee8ed.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

* This function has no effect since Spark 2.0.0.
*/
@Since("1.4.0")
@deprecated("Support for runs is deprecated. This param will have no effect in 2.0.0.", "1.6.0")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't it better to keep the @deprecated?

Copy link
Contributor Author

@yanboliang yanboliang Apr 25, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@deprecated means it take effect but not recommend to use, but in this PR we will make it no effect.

@jkbradley
Copy link
Member

I'll take a look

(default: None)
"""
if runs != 1:
warnings.warn(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd keep a warning, though you can remove the word "deprecated"

@jkbradley
Copy link
Member

  • pyspark.ml.clustering.KMeans needs to be updated too (in the docstrings)
  • pyspark.mllib.clustering.KMeansModel has a doc test example which needs to be updated

@jkbradley
Copy link
Member

That's all. Thanks for separating this out.

@SparkQA
Copy link

SparkQA commented Apr 26, 2016

Test build #56997 has finished for PR 12608 at commit 5f78dee.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@jkbradley
Copy link
Member

LGTM
Thanks!
Merging with master

@asfgit asfgit closed this in 302a186 Apr 26, 2016
@yanboliang yanboliang deleted the spark-11559 branch April 27, 2016 02:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants