-
- Downloads
[SPARK-18471][MLLIB] In LBFGS, avoid sending huge vectors of 0
## What changes were proposed in this pull request? CostFun used to send a dense vector of zeroes as a closure in a treeAggregate call. To avoid that, we replace treeAggregate by mapPartition + treeReduce, creating a zero vector inside the mapPartition block in-place. ## How was this patch tested? Unit test for module mllib run locally for correctness. As for performance we run an heavy optimization on our production data (50 iterations on 128 MB weight vectors) and have seen significant decrease in terms both of runtime and container being killed by lack of off-heap memory. Author: Anthony Truchet <a.truchet@criteo.com> Author: sethah <seth.hendrickson16@gmail.com> Author: Anthony Truchet <AnthonyTruchet@users.noreply.github.com> Closes #16037 from AnthonyTruchet/ENG-17719-lbfgs-only.
Showing
- mllib/src/main/scala/org/apache/spark/mllib/optimization/LBFGS.scala 18 additions, 10 deletions...ain/scala/org/apache/spark/mllib/optimization/LBFGS.scala
- mllib/src/test/scala/org/apache/spark/mllib/optimization/LBFGSSuite.scala 19 additions, 0 deletions...cala/org/apache/spark/mllib/optimization/LBFGSSuite.scala
Please register or sign in to comment