Skip to content

Commit cac83e8

Browse files
author
Alessandro Gagliardi
committed
use copyValues instead of setting each param individually
1 parent 894345e commit cac83e8

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ project/plugins/project/
1515
# Scala-IDE specific
1616
.scala_dependencies
1717
.worksheet
18+
.idea/
1819

1920
# emacs stuff
2021
\#*\#

src/main/scala/com/high-performance-spark-examples/ml/CustomPipeline.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,7 @@ class SimpleIndexer(override val uid: String)
123123
val words = dataset.select(dataset($(inputCol)).as[String]).distinct
124124
.collect()
125125
val model = new SimpleIndexerModel(uid, words)
126-
model.set(inputCol, $(inputCol))
127-
model.set(outputCol, $(outputCol))
126+
this.copyValues(model)
128127
model
129128
}
130129
}

0 commit comments

Comments
 (0)