vanvalenlab / deepcell-tf

Deep Learning Library for Single Cell Analysis
https://deepcell.readthedocs.io
Other
413 stars 95 forks source link

interrupted by signal 4: SIGILL #715

Closed FiReTiTi closed 6 months ago

FiReTiTi commented 6 months ago

Describe the bug When I try to load Mesmer

from deepcell.applications import Mesmer

I get the following error:

Process finished with exit code 132 (interrupted by signal 4: SIGILL)

To Reproduce I installed DeepCell using pip in a conda environment for Python 3.9.16 on a Apple M2 running Sonoma 14.4.1 Everything went just fine. Then I just try to run:

from deepcell.applications import Mesmer

Desktop (please complete the following information):

Additional context I've used deepcell/mesmer on older Mac Intel machines as well as linux and everything was just fine. So I'm not sure what can cause this issue.

In order to have more information, I ran the code with the option "-X faulthandler", and here is the trace I got:

Fatal Python error: Illegal instruction

Current thread 0x0000000205640240 (most recent call first):
  File "/Users/XXX/miniconda3/envs/Py39dev/lib/python3.9/ctypes/__init__.py", line 382 in __init__
  File "/Users/XXX/miniconda3/envs/Py39dev/lib/python3.9/site-packages/tensorflow/python/platform/self_check.py", line 65 in preload_check
  File "/Users/XXX/miniconda3/envs/Py39dev/lib/python3.9/site-packages/tensorflow/python/pywrap_tensorflow.py", line 24 in <module>
  File "<frozen importlib._bootstrap>", line 228 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 850 in exec_module
  File "<frozen importlib._bootstrap>", line 680 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 986 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1007 in _find_and_load
  File "<frozen importlib._bootstrap>", line 228 in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1058 in _handle_fromlist
  File "/Users/XXX/miniconda3/envs/Py39dev/lib/python3.9/site-packages/tensorflow/python/__init__.py", line 36 in <module>
  File "<frozen importlib._bootstrap>", line 228 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 850 in exec_module
  File "<frozen importlib._bootstrap>", line 680 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 986 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1007 in _find_and_load
  File "<frozen importlib._bootstrap>", line 228 in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 972 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1007 in _find_and_load
  File "/Users/XXX/miniconda3/envs/Py39dev/lib/python3.9/site-packages/tensorflow/__init__.py", line 37 in <module>
  File "<frozen importlib._bootstrap>", line 228 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 850 in exec_module
  File "<frozen importlib._bootstrap>", line 680 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 986 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1007 in _find_and_load
  File "/Users/XXX/miniconda3/envs/Py39dev/lib/python3.9/site-packages/deepcell/applications/cytoplasm_segmentation.py", line 31 in <module>
  File "<frozen importlib._bootstrap>", line 228 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 850 in exec_module
  File "<frozen importlib._bootstrap>", line 680 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 986 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1007 in _find_and_load
  File "/Users/XXX/miniconda3/envs/Py39dev/lib/python3.9/site-packages/deepcell/applications/__init__.py", line 30 in <module>
  File "<frozen importlib._bootstrap>", line 228 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 850 in exec_module
  File "<frozen importlib._bootstrap>", line 680 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 986 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1007 in _find_and_load
  File "<frozen importlib._bootstrap>", line 228 in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1058 in _handle_fromlist
  File "/Users/XXX/miniconda3/envs/Py39dev/lib/python3.9/site-packages/deepcell/__init__.py", line 31 in <module>
  File "<frozen importlib._bootstrap>", line 228 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 850 in exec_module
  File "<frozen importlib._bootstrap>", line 680 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 986 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1007 in _find_and_load
  File "<frozen importlib._bootstrap>", line 228 in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 972 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1007 in _find_and_load
  File "/Users/XXX/PyCharm/Prototyper39/Prototyper39.py", line 15 in <module>

Process finished with exit code 132 (interrupted by signal 4: SIGILL)
rossbar commented 6 months ago

From the head of the traceback, it's clear that the error is originating from tensorflow/wrapping code. The place to start debugging this would be to see if you can't get tensorflow successfully installed in your environment.

I will close this as there's nothing actionable from deepcell-tf itself, aside from updating tensorflow versions. See e.g. #711