[jira] [Commented] (SPARK-18735) Why don't we destroy the broadcast variable after each iteration?
[ https://issues.apache.org/jira/browse/SPARK-18735?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15724620#comment-15724620 ] Sean Owen commented on SPARK-18735: --- Should be because they are used in a computation that produces a simple value on the driver, not an RDD. Problem 2 is not an issue in this context. > Why don't we destroy the broadcast variable after each iteration? > - > > Key: SPARK-18735 > URL: https://issues.apache.org/jira/browse/SPARK-18735 > Project: Spark > Issue Type: Improvement > Components: MLlib >Affects Versions: 2.0.2 >Reporter: Jianfei Wang > > I think we should destroy the broadcast variable bcWeights explicitly in > spark.mllib.GradientDescent.runMiniBatchSGD > see the code below: > while (!converged && i <= numIterations) { > val start = System.nanoTime() > val bcWeights = data.context.broadcast(weights) > // some other code > } -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org
[jira] [Commented] (SPARK-18735) Why don't we destroy the broadcast variable after each iteration?
[ https://issues.apache.org/jira/browse/SPARK-18735?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15724605#comment-15724605 ] Jianfei Wang commented on SPARK-18735: -- oh no,I just see in Kmeans and GaussianMixture they both use destroy. > Why don't we destroy the broadcast variable after each iteration? > - > > Key: SPARK-18735 > URL: https://issues.apache.org/jira/browse/SPARK-18735 > Project: Spark > Issue Type: Improvement > Components: MLlib >Affects Versions: 2.0.2 >Reporter: Jianfei Wang > > I think we should destroy the broadcast variable bcWeights explicitly in > spark.mllib.GradientDescent.runMiniBatchSGD > see the code below: > while (!converged && i <= numIterations) { > val start = System.nanoTime() > val bcWeights = data.context.broadcast(weights) > // some other code > } -- This message was sent by Atlassian JIRA (v6.3.4#6332) - To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org