You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I've been creating some random forest regressors lately and I've noticed high memory usage during hyperparameter tuning. It turns out that there is some memory leakage in the package. For some reason Julia does not delete the trees when they become unreachable.
Following is a MWE: after finishing run_forests, some memory should be reclaimed but it doesn't happen and memory usage increases. When running the second loop however, memory usage stays constant.
using DecisionTree
functionrun_forests(features, labels)
forest =build_forest(labels, features)
labels .+=apply_forest(forest, features)
labels ./=2endfunctionrun_something_else(features, labels)
C =repeat(features, inner=(2,2))
labels ./=vec(sum(C, dims=2))[1:length(labels)]
endconst features =rand(10_000, 10)
const labels =sum(features, dims=2) |> vec
# notice memory consumption increases every couple of iterationsfor i =1:1_000run_forests(features, labels)
@info"Iteration $i current memory used" Sys.maxrss()
end# notice memory consumption does not increase every couple of iterationsfor i =1:1_000run_something_else(features, labels)
@info"Iteration $i current memory used" Sys.maxrss()
end
Any idea what might cause this?
The text was updated successfully, but these errors were encountered:
Yes. I can confirm on Julia 1.10 aarch64 Apple Darwin. During execution, htop memory usage will slowly increase each time that I call include("tmp.jl").
Hi, I've been creating some random forest regressors lately and I've noticed high memory usage during hyperparameter tuning. It turns out that there is some memory leakage in the package. For some reason Julia does not delete the trees when they become unreachable.
Following is a MWE: after finishing run_forests, some memory should be reclaimed but it doesn't happen and memory usage increases. When running the second loop however, memory usage stays constant.
Any idea what might cause this?
The text was updated successfully, but these errors were encountered: