kushalkolar / MESmerize

Platform for Calcium Imaging analysis. DEPRECATED.
GNU General Public License v3.0
61 stars 14 forks source link

[BUG] CNMFe error #103

Closed WhereWolf72 closed 2 years ago

WhereWolf72 commented 2 years ago

Describe the bug I can import a .tif file using the tiff importer and json_minimal metadata importer. Further, I can run motion correction and inspect the correlation and PNR after running that preliminary analysis. However, when I go to run the full CNMFe analysis, I get an error and don't get an output .hdf5 file, but get the other output files that I have gotten previously upon successful CNMFe analysis. I had this problem previously on an older laptop, but it was fixed when I did a fresh install on a new desktop. Now, I'm attempting to get Mesmerize working on a newer laptop in preparation for the CCN Caiman Workshop in a couple days. Thanks in advance for the help!

To Reproduce

  1. open viewer
  2. modules > load images > tiff file
  3. select file and load asarray, select json file and use json_minimal metadata importer
  4. modules > CaImAn Toolbox > CNMF-E
  5. input gSig size, enter name, and click "add to batch"
  6. Go to batch manager, run the task, double click on task to inspect correlation and PNR values
  7. return to CNMF-E window, adjust min_corr and min_pnr values accordingly, enter name for analysis, and click "add to batch"
  8. go to batch manager, run the task
  9. Upon notification that task has been run, task will be highlighted in red and no .hdf5 file will be output, disallowing visualization of ROIs. Seemingly all other file outputs are present in working directory.

Expected behavior Upon running full CNMF-E, I expected to get an .hdf5 file along with other file outputs so that I could visualize the ROIs as I have before.

Copy paste message from the error window (if any) status: 0 output_info: Traceback (most recent call last): File "/home/trevor/Desktop/Calcium_Imaging/mez/lib/python3.6/site-packages/mesmerize/viewer/modules/batch_run_modules/CNMFE.py", line 173, in run cnm.fit(Y) File "/home/trevor/CaImAn/caiman/source_extraction/cnmf/cnmf.py", line 606, in fit indices=indices) File "/home/trevor/CaImAn/caiman/source_extraction/cnmf/map_reduce.py", line 249, in run_CNMF_patches file_res = dview.map_async(cnmf_patches, args_in).get(4294967) File "/usr/lib/python3.6/multiprocessing/pool.py", line 644, in get raise self._value multiprocessing.pool.MaybeEncodingError: Error sending result: '<multiprocessing.pool.ExceptionWithTraceback object at 0x7f989d7a6240>'. Reason: 'PicklingError("Can't pickle <class '_flapack.error'>: import of module '_flapack' failed",)'

Y.shape: [535, 512, 512] processing_time: 0.6470573385556538

Copy-paste or take a screenshot of the terminal that Mesmerize is running in

home/user/Desktop/Calcium_Imaging/mez/lib/python3.6/site-packages/sklearn/utils/deprecation.py:143: FutureWarning: The sklearn.cluster.k_means_ module is  deprecated in version 0.22 and will be removed in version 0.24. The corresponding classes / functions should instead be imported from sklearn.cluster. Anything that cannot be imported from sklearn.cluster is now part of the private API.
  warnings.warn(message, FutureWarning)
Loading, please wait... 
%(asctime)s %(levelname)s %(pathname)s %(lineno)s 
 %(message)s 
Moving old logfiles...
Moving old logfiles...
%(asctime)s %(levelname)s %(pathname)s %(lineno)s 
 %(message)s 
starting batch mananger
starting batch mananger
showing corr pnr

Make sure the entire stack trace is visible, and all messages relevant to the issue are visible.

If relevant, messages from the batch manager terminal image

Screenshots If applicable, add screenshots to help explain your problem.

Operating System & specs (CPU, RAM etc.). Please complete the following information:

Details about your Mesmerize install

Environment

Additional context Just in case it was a similar problem to my previous bug report (#82), I followed the suggested steps around liblapack and libopenblas, but it didn't fix the issue. I did get an error surrounding tensorflow-gpu's dependencies (see below), but I don't believe that I'm even utilizing that package for this step.

Tensorflow dependency error:

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
tensorflow-gpu 1.15.5 requires gast==0.2.2, but you have gast 0.3.3 which is incompatible.
tensorflow-gpu 1.15.5 requires numpy<1.19.0,>=1.16.0, but you have numpy 1.19.5 which is incompatible.
tensorflow-gpu 1.15.5 requires tensorboard<1.16.0,>=1.15.0, but you have tensorboard 2.2.2 which is incompatible.
tensorflow-gpu 1.15.5 requires tensorflow-estimator==1.15.1, but you have tensorflow-estimator 2.2.0 which is incompatible.
kushalkolar commented 2 years ago

Mesmerize and caiman version?

I you can't get it working by late this afternoon just use the VM for the workshop.

On Tue, May 31, 2022, 23:06 WhereWolf72 @.***> wrote:

Assigned #103 https://github.com/kushalkolar/MESmerize/issues/103 to @kushalkolar https://github.com/kushalkolar.

— Reply to this email directly, view it on GitHub https://github.com/kushalkolar/MESmerize/issues/103#event-6714693649, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACHXXRDDE5RZQ7T2GJJNLMTVM3HU7ANCNFSM5XPQTG6Q . You are receiving this because you were assigned.Message ID: @.***>

WhereWolf72 commented 2 years ago

Mesmerize == 0.7.1 and caiman == 1.8.8

Thanks for your assistance, I'm not sure why this install is any different than what is running on my desktop (which runs perfectly).