Closed oterocoronel closed 1 year ago
When you do job.calculate_corrmap
outside of the sweep, does that also have the same issue?
Trying that now. With a batch of 100 frames:
Will reconstruct SVD movie on-the-fly from with 300 components
Created files and dirs for 36 batches
Running batch 1 of 36
Reconstructing from svd
(1092, 100, 160000)
Reconstructed in 607.30 seconds
Loaded and swapped, idx 0 to 100
Calculating corr map
Rolling mean filter
Stdev over time
Sharr creation
Sub and conv
Vmap
Calculated corr map in 156.99 seconds
RAM usage did not go as high (~100 GB)
OK, if you try the sweep with job.sweep_params(params_to_sweep, mov = svd_info, ...)
and a small batchsize of 100, it should run the exact same code as job.calculate_corrmap
above, so it won't use crazy amounts of memory. You can change n_test_iters
to 4 for the sweep to use 400 frames. I think that should work faster in your case?
I will change the parameter interface to be less confusing in the future, but for now:
mov=svd_info
as an argument to sweep_params
or calculate_corr_map
, and set smaller batchsizessvd_info=svd_info
to load and keep all of the spatial components in memory onceAs of https://github.com/alihaydaroglu/s2p-lbm/commit/22f6fdf7177e5b9129560305cbf67c1f63557f6d the former is the default in the demo notebook, and I've added a warning if you are using the RAM-greedy option
It seems like n_test_iters
is not being used when using mov=svd_info
and sweeping, it is trying to go through the whole recording (n_batches * t_batch_size
= total_frames). Might be nice to just do one batch for sweeping
closing this for now, since small batchsizes and using the less RAM-greedy mode seem to fix the issue.
n_test_iters
works as intended, but there are a few misleading print statements that i'll fix to clarify that it's only doing a few batches
When running
job.sweep_params(params_to_sweep, svd_info, ... )
for a 1000x1000 pix recording and 300 SVD components, RAM usage goes to ~400 GB and it takes a very long time to run.When running
job.sweep_params(params_to_sweep, mov = svd_info, ...)
, the issue persists. Haven't finished yet but it is using +340 GB RAM and it has been stuck at this step for 20+ minutes (and I assume there will be more batches to process? it is trying to use the whole movie?):Parameters:
n_test_iters = 1