Github user jkbradley commented on a diff in the pull request:
https://github.com/apache/spark/pull/19208#discussion_r149225714
--- Diff:
mllib/src/main/scala/org/apache/spark/ml/tuning/CrossValidator.scala ---
@@ -323,39 +338,40 @@ object CrossValidatorModel extends
MLReadable[CrossValidatorModel] {
@Since("1.6.0")
override def load(path: String): CrossValidatorModel = super.load(path)
- private[CrossValidatorModel]
+ /**
+ * Writer for CrossValidatorModel.
+ * @param instance CrossValidatorModel instance used to construct the
writer
+ *
+ * Options:
+ * CrossValidatorModelWriter support an option "persistSubModels",
available value is
+ * "true" or "false". If you set collectSubModels param before fitting,
and then you can set
+ * the option "persistSubModels" to be "true" and the submodels will be
persisted.
+ * The default value of "persistSubModels" will be "true", if you set
collectSubModels
+ * param before fitting, but if you do not set collectSubModels param
before fitting, setting
+ * "persistSubModels" will cause exception.
+ */
+ @Since("2.3.0")
class CrossValidatorModelWriter(instance: CrossValidatorModel) extends
MLWriter {
--- End diff --
Although we're making this public, let's not make all of its APIs public.
Can you please make the constructor private and make this class final?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]