-
Notifications
You must be signed in to change notification settings - Fork 370
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
'cnmf_refit.estimates.detrend_df_f' in demo_pipeline.ipynb requires tons of memory? #1274
Comments
Yikes that's not good. This is a relatively simple calculation that shouldn't require that much memory. Let me try to reproduce soon: we've started to adjust things around that method recently (see #1260 ). I should be able to get to it tomorrow. |
What if you give |
I had |
I was the person that filed nel-lab/mesmerize-core#276 in mesmerize. I gave use_residuals=False, and ran get_detrend_dfof and I still get the same problem. I agree that this is a simple calculation and should not require much memory leading to a crash. Here is a screenshot with nvtop. I suppose I could work around this by running the old matlab code exxtract_DF_F.m. |
@restrepd That's your GPU VRAM not your system RAM. Caiman doesn't use the GPU. |
@kushalkolar yes, the graph in nvtop is GPU and it is not used by caiman. But at the bottom it does list "CPU HOST MEM" (memsmerize is restrepd...). At any rate it crashed. |
Yep this is #1262 . Ummm....avoid Thanks for pushing on this! I'll fix the demo notebook asap. The underlying bug will be fixed as soon as I can. |
Thanks a bunch! |
Ok I wasn't crazy I thought I had fixed it (with a hack): the workaround in the notebook to avoid the infinite while loop bug is to set I'll work on an actual longer-term solution, but I should mention that this flag is pretty important because it's holding things together with spit and paper currently basically. 😬 |
Thanks! It works! |
Just to clarify: it isn't taking tons of CPU load because it is a computationally demanding computation, but because you are sucked into an infinite while loop. I will work on fixing this my guess is within a week, so people can once again use |
Also confirming that setting |
Just to clarify, as I was a bit murky above: it should work with either value of |
This is fixed as of #1288 the different permutations of dff calculation should now work (I think it is merged into main so should be part of conda install now). |
Thanks!
Diego
Diego Restrepo, PhD
Professor of Cell and Developmental Biology
http://www.restrepolab.org/
University of Colorado Anschutz Medical Campus
Department of Cell and Developmental Biology
MS 8108
Bldg RC1 South, Room L18-11119
12801 E 17th Ave
Aurora, CO 80045
Tel: 303-724-3405
Fax:303-724-3420
From: Eric Thomson ***@***.***>
Date: Friday, March 22, 2024 at 10:22 AM
To: flatironinstitute/CaImAn ***@***.***>
Cc: Restrepo, Diego ***@***.***>, Mention ***@***.***>
Subject: Re: [flatironinstitute/CaImAn] 'cnmf_refit.estimates.detrend_df_f' in demo_pipeline.ipynb requires tons of memory? (Issue #1274)
[External Email - Use Caution]
This is fixed as of #1288<#1288> the different permutations of dff calculation should now work (I think it is merged into main so should be part of conda install now).
—
Reply to this email directly, view it on GitHub<#1274 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/A2FV7SB4VGHIXEFMD6J2NUDYZRLFDAVCNFSM6AAAAABDHDCEIGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMJVGQ2DQOBZGM>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Please fill in the following for any issues
Your setup:
Repeatable on both my university's computing cluster and my Mac laptop
cnmf_refit.estimates.evaluate_components
Thank you for such a fabulous set of well-documented tools!
I'm running demo_pipeline.ipynb, using data provided by the demo, and all but one cell in the notebook works like a charm, both when I run the jupyter notebook (via VS Code) interactively on our computing cluster with lots of memory and my Mac, which also has a decent amount of memory.
However, every time I reach the cell containing the function that computes delta_f/f (using cnmf_refit.estimates.detrend_df_f), the kernel crashes. I suspect it's a memory issue because when I monitor memory consumption on our computing cluster using 'top', over the course of ~15 min memory usage gradually increases to ~200GB before it hits 0 and the kernel crashes. Likewise, on my Mac with 96GB of memory, after 15 min it says the application ran out of memory.
Are there any options or parameters I can change to help this? Or is the only solution to just get more memory? We have some large datasets we want to analyze, so I worry that if I'm hitting memory issues with the demo data that I will certainly encounter this issue on the data we're interested in.
Thanks for any help or advice!
Brian
The text was updated successfully, but these errors were encountered: