GitHub user AnthonyTruchet opened a pull request:
https://github.com/apache/spark/pull/16037
[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.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/criteo-forks/spark ENG-17719-lbfgs-only
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/16037.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #16037
----
commit 0e924ec09554acf3191dea51c5a13b024a0c643f
Author: Eugene Kharitonov <[email protected]>
Date: 2016-10-14T11:25:34Z
[SPARK-18471][MLLIB] In LBFGS, avoid sending huge vectors of 0
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.
commit af4b1c96ec5a5759e8b66117794d2a011f6313c3
Author: Anthony Truchet <[email protected]>
Date: 2016-11-18T12:36:00Z
Style fix according to reviewers' feedback
commit 0a0571dc9557e94a909ab8d8ef62c7dca474a1c0
Author: Anthony Truchet <[email protected]>
Date: 2016-11-28T15:39:16Z
Code style according to reviewers feed-back.
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]