Github user holdenk commented on a diff in the pull request:

    https://github.com/apache/spark/pull/19208#discussion_r148433035
  
    --- Diff: 
mllib/src/main/scala/org/apache/spark/ml/tuning/CrossValidator.scala ---
    @@ -117,6 +123,12 @@ class CrossValidator @Since("1.2.0") (@Since("1.4.0") 
override val uid: String)
         instr.logParams(numFolds, seed, parallelism)
         logTuningParams(instr)
     
    +    val collectSubModelsParam = $(collectSubModels)
    +
    +    var subModels: Option[Array[Array[Model[_]]]] = if 
(collectSubModelsParam) {
    --- End diff --
    
    so this var seems unnecessary, could we just it seems like we'd be better 
by just collecting modelFutures in copy values (then we can avoid the mutation 
on L145)


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to