CaImAn icon indicating copy to clipboard operation
CaImAn copied to clipboard

Rerun with the same options bug

Open fatihdinc opened this issue 2 years ago • 2 comments

Hi,

This bug is also quite straightforward. When I re-run cnmf pipeline with the same options, the patch size option somehow gets reset to None. So, it is not really possible to use the same opts to reproduce the results or perform batch processing, as the patch size is changed inside the cnmf.fit function, which is not desirable. I am using the demo_pipeline demo file to get this bug. I thought you would want to know about this. Here is how to produce it easily:

Just run demo_pipeline script, then in the end look inside the opts parameters, which will have rf as None...

I suppose this is due to the fact that we are using refit and that initializes the rf to None. Or maybe some other function changes rf value to None too, but opts is a different class from cnm. While local changes inside the cnm.refit/fit() function to the opts is reasonable, I think the users would be better served if their global opts dictionary is not changed after running it through an iteration. Thank you!

fatihdinc avatar Jun 10 '22 02:06 fatihdinc

I am thinking about this; I haven't yet decided how to handle it. Thanks for bringing it to my attention.

pgunn avatar Jun 27 '22 15:06 pgunn

I am working on the cnmf demo and will look into fixing this. Thanks @fatihdinc for pointing it out!

EricThomson avatar May 01 '23 18:05 EricThomson