Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[SPARK-7100][MLLib] Fix persisted RDD leak in GradientBoostTrees
  • Loading branch information
Jim Carroll committed Apr 27, 2015
commit 45f4b03c4bc8f5e2fa06c84cb83ae5db97e6abec
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,10 @@ object GradientBoostedTrees extends Logging {
treeStrategy.assertValid()

// Cache input
if (input.getStorageLevel == StorageLevel.NONE) {
val persistedInput = if (input.getStorageLevel == StorageLevel.NONE) {
input.persist(StorageLevel.MEMORY_AND_DISK)
}
true
} else false

timer.stop("init")

Expand Down Expand Up @@ -265,6 +266,9 @@ object GradientBoostedTrees extends Logging {

logInfo("Internal timing for DecisionTree:")
logInfo(s"$timer")

if (persistedInput) input.unpersist()

if (validate) {
new GradientBoostedTreesModel(
boostingStrategy.treeStrategy.algo,
Expand Down