-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory leak in scran normalization #155
Comments
Hmm, thanks for the bug report. This likely has to do with using an I'm not sure how to close the |
I just tested more or less this in #156, but it didn't work for me... Maybe there's more than the data object stored in the Ah, you called the python garbage collector afterwards... i thought this would have sufficed in |
Worth noting too that I actually had to call the python garbage collector multiple times for the freed memory to register in |
Okay, so there could still be a residual issue with the |
Just tried -- |
that's what I feared.... |
Did you try running |
I've now unloaded modules as well in #156, but haven't yet managed to close the session. Still waiting on an answer in rpy2/rpy2#730. Could you take a look and see if it works any better for you with the solution in the PR? |
Looks good to me. Seems releasing memory back to system is a finicky thing so measuring using psutil is imperfect, but I think this is doing the job. The first time I run this it looks back, second time it looks good.
|
Another point: we should probably coerce to dgCMatrix. See MarioniLab/scran#70 |
I just saw maybe we can improve further using |
Seems like a good idea. The startup cost is low and the chances the user wants to use R again are pretty slim, right? Also PR #164 addresses my previous comment and should save a lot of time and memory. |
Seems that scran normalization is a) densifying the data and b) not freeing it afterwards.
Plot shows available memory at each stage of the process.
Related: openproblems-bio/openproblems#54
The text was updated successfully, but these errors were encountered: