huaxingao commented on a change in pull request #28595:
URL: https://github.com/apache/spark/pull/28595#discussion_r429765422
##########
File path:
mllib/src/main/scala/org/apache/spark/ml/param/shared/sharedParams.scala
##########
@@ -562,4 +562,20 @@ trait HasBlockSize extends Params {
/** @group expertGetParam */
final def getBlockSize: Int = $(blockSize)
}
+
+/**
+ * Trait for shared param k. This trait may be changed or
+ * removed between minor versions.
+ */
+trait HasK extends Params {
+
+ /**
+ * Param for The number of clusters to create. Must be (> 1). Note that
it is possible for fewer than k clusters to be returned.
+ * @group param
+ */
+ final val k: IntParam = new IntParam(this, "k", "The number of clusters to
create. Must be (> 1). Note that it is possible for fewer than k clusters to be
returned", ParamValidators.gt(1))
Review comment:
Yes, we lost the ```@Since``` annotations for ```k``` and ```getK```. We
still have since 2.4.0 for ```setK```, though.
For all the shared params, we don't have ```@Since``` annotations for the
param and getXXX, only have ```@Since``` annotations for setXXX.
##########
File path:
mllib/src/main/scala/org/apache/spark/ml/param/shared/sharedParams.scala
##########
@@ -562,4 +562,20 @@ trait HasBlockSize extends Params {
/** @group expertGetParam */
final def getBlockSize: Int = $(blockSize)
}
+
+/**
+ * Trait for shared param k. This trait may be changed or
+ * removed between minor versions.
+ */
+trait HasK extends Params {
+
+ /**
+ * Param for The number of clusters to create. Must be (> 1). Note that
it is possible for fewer than k clusters to be returned.
+ * @group param
+ */
+ final val k: IntParam = new IntParam(this, "k", "The number of clusters to
create. Must be (> 1). Note that it is possible for fewer than k clusters to be
returned", ParamValidators.gt(1))
+
+ /** @group getParam */
+ final def getK: Int = $(k)
Review comment:
Right, no MiMia problems if this isn't final, but we can't change it
because it's generated code.
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]