Github user viirya commented on a diff in the pull request:
https://github.com/apache/spark/pull/20633#discussion_r176310898
--- Diff: mllib/src/main/scala/org/apache/spark/ml/param/params.scala ---
@@ -791,7 +791,7 @@ trait Params extends Identifiable with Serializable {
* this method gets called.
* @param value the default value
*/
- protected final def setDefault[T](param: Param[T], value: T): this.type
= {
+ private[ml] final def setDefault[T](param: Param[T], value: T):
this.type = {
--- End diff --
Because we need to call `setDefault` in `Metadata.setParams`, I can't leave
it as `protected`. But I think it is important to keep the extensibility. And I
think we can't make it as `public` too. I add object `Params` and use it to
help us update default param of a `Params`.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]