Github user BryanCutler commented on the issue:
https://github.com/apache/spark/pull/17306
Yeah, that's true in this case. You could just build the grids separately
and combine them like this
```scala
val pipeline1_grid = new ParamGridBuilder()
.baseOn(pipeline.stages -> pipeline1)
.addGrid(hashingTF.numFeatures, Array(10, 100, 1000))
.addGrid(lr.regParam, Array(0.1, 0.01))
.build()
val pipeline2_grid = new ParamGridBuilder()
.baseOn(pipeline.stages -> pipeline2)
.addGrid(hashingTF.numFeatures, Array(10, 100, 1000))
.build()
val paramGrid = pipeline1_grid ++ pipeline2_grid
```
Maybe not all that intuitive though...
It might be worth it to add some smarts in the `ParamGridBuilder` or
`CrossValidator` to prune the grid if there is a pipeline and params not used
in any of the stages.
---
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]