You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by WeichenXu123 <gi...@git.apache.org> on 2017/12/13 09:35:04 UTC

[GitHub] spark pull request #19350: [SPARK-22126][ML][WIP] Fix model-specific optimiz...

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

    https://github.com/apache/spark/pull/19350#discussion_r156603289
  
    --- Diff: mllib/src/main/scala/org/apache/spark/ml/Estimator.scala ---
    @@ -82,5 +86,49 @@ abstract class Estimator[M <: Model[M]] extends PipelineStage {
         paramMaps.map(fit(dataset, _))
       }
     
    +  /**
    +   * (Java-specific)
    +   */
    +  @Since("2.3.0")
    +  def fit(dataset: Dataset[_], paramMaps: Array[ParamMap],
    +    unpersistDatasetAfterFitting: Boolean, executionContext: ExecutionContext,
    +    modelCallback: VoidFunction2[Model[_], Int]): Unit = {
    +    // Fit models in a Future for training in parallel
    +    val modelFutures = paramMaps.map { paramMap =>
    +      Future[Model[_]] {
    +        fit(dataset, paramMap).asInstanceOf[Model[_]]
    --- End diff --
    
    @MLnick Oh, the design is still under discussion on JIRA and will be changed I think. I should mark this WIP. thanks!


---

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