Skip to content
Snippets Groups Projects
Unverified Commit c5a64d76 authored by Anthony Truchet's avatar Anthony Truchet Committed by Sean Owen
Browse files

[SPARK-18612][MLLIB] Delete broadcasted variable in LBFGS CostFun

## What changes were proposed in this pull request?

Fix a broadcasted variable leak occurring at each invocation of CostFun in L-BFGS.

## How was this patch tested?

UTests + check that fixed fatal memory consumption on Criteo's use cases.

This contribution is made on behalf of Criteo S.A.
(http://labs.criteo.com/) under the terms of the Apache v2 License.

Author: Anthony Truchet <a.truchet@criteo.com>

Closes #16040 from AnthonyTruchet/SPARK-18612-lbfgs-cost-fun.
parent fe854f2e
No related branches found
No related tags found
No related merge requests found
......@@ -252,6 +252,9 @@ object LBFGS extends Logging {
(grad1, loss1 + loss2)
})
// broadcasted model is not needed anymore
bcW.destroy()
/**
* regVal is sum of weight squares if it's L2 updater;
* for other updater, the same logic is followed.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment