[
https://issues.apache.org/jira/browse/SPARK-27892?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17155682#comment-17155682
]
Apache Spark commented on SPARK-27892:
--------------------------------------
User 'Moovlin' has created a pull request for this issue:
https://github.com/apache/spark/pull/29068
> 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: 3.1.0
> 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
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]