GitHub user AnthonyTruchet opened a pull request:

    https://github.com/apache/spark/pull/16279

    [SPARK-18471][MLLIB][BACKPORT-2.0] 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 change the aggregation operations
    to convert sparse vectors into dense vectors on the fly if needed and we 
    pass a sparse 0 vector which is lightweight.
    
    # 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.truc...@criteo.com>
    Author: sethah <seth.hendrickso...@gmail.com>

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/criteo-forks/spark SPARK-18471-branch-2.0

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/16279.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 #16279
    
----
commit 27f5796831ccb7931303a337d6125714aaa66b5a
Author: Anthony Truchet <a.truc...@criteo.com>
Date:   2016-12-13T21:30:57Z

    [SPARK-18471][MLLIB][BACKPORT-2.0] 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.
    
    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.truc...@criteo.com>
    Author: sethah <seth.hendrickso...@gmail.com>

----


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to