Github user jkbradley commented on a diff in the pull request:
https://github.com/apache/spark/pull/5510#discussion_r28369309
--- Diff:
mllib/src/main/scala/org/apache/spark/ml/tuning/ParamGridBuilder.scala ---
@@ -100,13 +100,16 @@ class ParamGridBuilder {
* Builds and returns all combinations of parameters specified by the
param grid.
*/
def build(): Array[ParamMap] = {
- var paramMaps = Array(new ParamMap)
- paramGrid.foreach { case (param, values) =>
- val newParamMaps = values.flatMap { v =>
- paramMaps.map(_.copy.put(param.asInstanceOf[Param[Any]], v))
+ if (paramGrid.isEmpty) Array.empty[ParamMap]
--- End diff --
style: Can you please put braces around this part as well to match the
braces around the "else" part? (That comment from @srowen was hidden by the
update)
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]