[ 
https://issues.apache.org/jira/browse/SPARK-27892?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jason Wang updated SPARK-27892:
-------------------------------
    Description: 
When a PipelineModel is saved/loaded, all the stages are saved/loaded 
sequentially. When dealing with a PipelineModel with many stages, although each 
stage's save/load takes sub-second, the total time taken for the PipelineModel 
could be several minutes. It should be trivial to parallelize the save/load of 
stages in the SharedReadWrite object.

 

To reproduce:
{code:java}
import org.apache.spark.ml._
import org.apache.spark.ml.feature.VectorAssembler
val outputPath = "..."
val stages = (1 to 100) map { i => new 
VectorAssembler().setInputCols(Array("input")).setOutputCol("o" + i)}
val p = new Pipeline().setStages(stages.toArray)
val data = Seq(1, 1, 1) toDF "input"
val pm = p.fit(data)
pm.save(outputPath){code}

  was:When a PipelineModel is saved/loaded, all the stages are saved/loaded 
sequentially. When dealing with a PipelineModel with many stages, although each 
stage's save/load takes sub-second, the total time taken for the PipelineModel 
could be several minutes. It should be trivial to parallelize the save/load of 
stages in the SharedReadWrite object.


> Saving/loading stages in PipelineModel should be parallel
> ---------------------------------------------------------
>
>                 Key: SPARK-27892
>                 URL: https://issues.apache.org/jira/browse/SPARK-27892
>             Project: Spark
>          Issue Type: Improvement
>          Components: ML
>    Affects Versions: 2.4.3
>            Reporter: Jason Wang
>            Priority: Minor
>              Labels: easyfix, performance
>
> When a PipelineModel is saved/loaded, all the stages are saved/loaded 
> sequentially. When dealing with a PipelineModel with many stages, although 
> each stage's save/load takes sub-second, the total time taken for the 
> PipelineModel could be several minutes. It should be trivial to parallelize 
> the save/load of stages in the SharedReadWrite object.
>  
> To reproduce:
> {code:java}
> import org.apache.spark.ml._
> import org.apache.spark.ml.feature.VectorAssembler
> val outputPath = "..."
> val stages = (1 to 100) map { i => new 
> VectorAssembler().setInputCols(Array("input")).setOutputCol("o" + i)}
> val p = new Pipeline().setStages(stages.toArray)
> val data = Seq(1, 1, 1) toDF "input"
> val pm = p.fit(data)
> pm.save(outputPath){code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to