ENHANCE-PET / MOOSE

MOOSE (Multi-organ objective segmentation) a data-centric AI solution that generates multilabel organ segmentations to facilitate systemic TB whole-person research.The pipeline is based on nn-UNet and has the capability to segment 120 unique tissue classes from a whole-body 18F-FDG PET/CT image.
https://enhance.pet
GNU General Public License v3.0
196 stars 28 forks source link

BUG: ValueError: need at most 63 handles, got a sequence of length 66 #138

Closed BruceZhang-624 closed 1 month ago

BruceZhang-624 commented 2 months ago

Describe the bug Hi! I tried the MOOSE to segment CT on the Windows server with 32 cores. It outputs an error:

 🔮 PREDICT:

\ [1/1] Preparing data for prediction for S1...Exception in thread Thread-6 (_handle_workers):
Traceback (most recent call last):
  File "C:\Users\moose\anaconda3\envs\moose-env\lib\threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "C:\Users\moose\anaconda3\envs\moose-env\lib\threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "C:\Users\moose\anaconda3\envs\moose-env\lib\multiprocessing\pool.py", line 522, in _handle_workers
    cls._wait_for_updates(current_sentinels, change_notifier)
  File "C:\Users\moose\anaconda3\envs\moose-env\lib\multiprocessing\pool.py", line 502, in _wait_for_updates
    wait(sentinels, timeout=timeout)
  File "C:\Users\moose\anaconda3\envs\moose-env\lib\multiprocessing\connection.py", line 879, in wait
    ready_handles = _exhaustive_wait(waithandle_to_obj.keys(), timeout)
  File "C:\Users\moose\anaconda3\envs\moose-env\lib\multiprocessing\connection.py", line 811, in _exhaustive_wait
    res = _winapi.WaitForMultipleObjects(L, False, timeout)
ValueError: need at most 63 handles, got a sequence of length 66
- [1/1] Preparing data for prediction for S1...

I saw some people encountered similar issues before (https://github.com/psf/black/issues/564).

Is it possible to make some adjustments for this issue?

To Reproduce (moose-env) Z:\code>moosez -d Z:\20240719_CB467_idmoose\moose_out\moose_clin_ct_body -m clin_ct_body

Expected behavior It works for a Windows server with 8 cores. (same OS settings except for the spec)

Screenshots image

Desktop (please complete the following information): image

LalithShiyam commented 2 months ago

@mprires @Keyn34 can you manage this - I have very little resources, to debug.

mprires commented 2 months ago

Hi @BruceZhang-624

Can you tell me which python version you are using? Also from your command line output it seems like you are using an anaconda environment. Did you try a python venv environment?

LalithShiyam commented 1 month ago

Closing it due to inactivity!