You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Xiaoye Sun (JIRA)" <ji...@apache.org> on 2016/11/23 21:05:58 UTC
[jira] [Comment Edited] (SPARK-18548) OnlineLDAOptimizer reads the
same broadcast data after deletion
[ https://issues.apache.org/jira/browse/SPARK-18548?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15691359#comment-15691359 ]
Xiaoye Sun edited comment on SPARK-18548 at 11/23/16 9:05 PM:
--------------------------------------------------------------
Hi Yuhao,
Sorry for misleading you.
expElogbetaBc is the broadcast variable of expElogbeta.
It is unpersisted between the line of
"val statsSum: BDM[Double] = stats.map(_._1).reduce(_ += _)"
and
"val gammat: BDM[Double] = breeze.linalg.DenseMatrix.vertcat(stats.map(_._2).reduce(_ ++ _).map(_.toDenseMatrix): _*)".
However, the later line also uses the expElogbetaBc, which causes the worker fetch expElogbetaBc again after it is unpersisted.
I suggest moving the line of
"expElogbetaBc.unpersist()"
after the the line of
"val gammat: BDM[Double] = breeze.linalg.DenseMatrix.vertcat(stats.map(_._2).reduce(_ ++ _).map(_.toDenseMatrix): _*)".
was (Author: sunxiaoye0116):
Hi Yuhao,
Sorry for misleading you.
expElogbetaBc is the broadcast variable of expElogbeta.
It is unpersisted between the line of
val statsSum: BDM[Double] = stats.map(_._1).reduce(_ += _)
and
val gammat: BDM[Double] = breeze.linalg.DenseMatrix.vertcat(stats.map(_._2).reduce(_ ++ _).map(_.toDenseMatrix): _*)
However, the later line also uses the expElogbetaBc which cause the worker fetch expElogbetaBc again after it is unpersisted.
I suggest move the line of
expElogbetaBc.unpersist()
after the the line of
val gammat: BDM[Double] = breeze.linalg.DenseMatrix.vertcat(stats.map(_._2).reduce(_ ++ _).map(_.toDenseMatrix): _*)
> OnlineLDAOptimizer reads the same broadcast data after deletion
> ---------------------------------------------------------------
>
> Key: SPARK-18548
> URL: https://issues.apache.org/jira/browse/SPARK-18548
> Project: Spark
> Issue Type: Improvement
> Components: MLlib
> Affects Versions: 1.6.1
> Reporter: Xiaoye Sun
> Priority: Trivial
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> In submitMiniBatch() called by OnlineLDAOptimizer, broadcast variable expElogbeta is deleted before its use in the second time, which causes the executor reads the same large broadcast data twice. I suggest to move the broadcast data deletion (expElogbetaBc.unpersist()) later.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org