diff --git a/mllib/src/main/scala/org/apache/spark/ml/param/shared/SharedParamsCodeGen.scala b/mllib/src/main/scala/org/apache/spark/ml/param/shared/SharedParamsCodeGen.scala index c54062921fce..a267bbc87432 100644 --- a/mllib/src/main/scala/org/apache/spark/ml/param/shared/SharedParamsCodeGen.scala +++ b/mllib/src/main/scala/org/apache/spark/ml/param/shared/SharedParamsCodeGen.scala @@ -84,10 +84,10 @@ private[shared] object SharedParamsCodeGen { ParamDesc[String]("solver", "the solver algorithm for optimization", finalFields = false), ParamDesc[Int]("aggregationDepth", "suggested depth for treeAggregate (>= 2)", Some("2"), isValid = "ParamValidators.gtEq(2)", isExpertParam = true), - ParamDesc[Boolean]("collectSubModels", "If set to false, then only the single best " + - "sub-model will be available after fitting. If set to true, then all sub-models will be " + - "available. Warning: For large models, collecting all sub-models can cause OOMs on the " + - "Spark driver.", + ParamDesc[Boolean]("collectSubModels", "whether to collect a list of sub-models trained " + + "during tuning. If set to false, then only the single best sub-model will be available " + + "after fitting. If set to true, then all sub-models will be available. Warning: For " + + "large models, collecting all sub-models can cause OOMs on the Spark driver", Some("false"), isExpertParam = true) ) diff --git a/mllib/src/main/scala/org/apache/spark/ml/param/shared/sharedParams.scala b/mllib/src/main/scala/org/apache/spark/ml/param/shared/sharedParams.scala index 34aa38ac751f..0004f085d10f 100644 --- a/mllib/src/main/scala/org/apache/spark/ml/param/shared/sharedParams.scala +++ b/mllib/src/main/scala/org/apache/spark/ml/param/shared/sharedParams.scala @@ -470,15 +470,17 @@ trait HasAggregationDepth extends Params { } /** - * Trait for shared param collectSubModels (default: false). + * Trait for shared param collectSubModels (default: false). This trait may be changed or + * removed between minor versions. */ -private[ml] trait HasCollectSubModels extends Params { +@DeveloperApi +trait HasCollectSubModels extends Params { /** - * Param for whether to collect a list of sub-models trained during tuning. + * Param for whether to collect a list of sub-models trained during tuning. If set to false, then only the single best sub-model will be available after fitting. If set to true, then all sub-models will be available. Warning: For large models, collecting all sub-models can cause OOMs on the Spark driver. * @group expertParam */ - final val collectSubModels: BooleanParam = new BooleanParam(this, "collectSubModels", "whether to collect a list of sub-models trained during tuning") + final val collectSubModels: BooleanParam = new BooleanParam(this, "collectSubModels", "whether to collect a list of sub-models trained during tuning. If set to false, then only the single best sub-model will be available after fitting. If set to true, then all sub-models will be available. Warning: For large models, collecting all sub-models can cause OOMs on the Spark driver") setDefault(collectSubModels, false)