Skip to content
Snippets Groups Projects
Commit 0c5207c6 authored by Joseph K. Bradley's avatar Joseph K. Bradley Committed by Xiangrui Meng
Browse files

[SPARK-8994] [ML] tiny cleanups to Params, Pipeline

Made default impl of Params.validateParams empty
CC mengxr

Author: Joseph K. Bradley <joseph@databricks.com>

Closes #7349 from jkbradley/pipeline-small-cleanups and squashes the following commits:

4e0f013 [Joseph K. Bradley] small cleanups after SPARK-5956
parent 7f6be1f2
No related branches found
No related tags found
No related merge requests found
......@@ -95,6 +95,8 @@ class Pipeline(override val uid: String) extends Estimator[PipelineModel] {
/** @group setParam */
def setStages(value: Array[PipelineStage]): this.type = { set(stages, value); this }
// Below, we clone stages so that modifications to the list of stages will not change
// the Param value in the Pipeline.
/** @group getParam */
def getStages: Array[PipelineStage] = $(stages).clone()
......
......@@ -341,9 +341,7 @@ trait Params extends Identifiable with Serializable {
* those are checked during schema validation.
*/
def validateParams(): Unit = {
params.filter(isDefined).foreach { param =>
param.asInstanceOf[Param[Any]].validate($(param))
}
// Do nothing by default. Override to handle Param interactions.
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment