The algorithm failed on one or more cases.

The algorithm failed on one or more cases.  

  By: 坤坤kk on July 13, 2023, 4:33 a.m.

Hello, can you help me take a look at the details of my latest submit bug? Because I've experimentally read data successfully and made predictions, but the latest submit says, 'The algorithm failed on one or more cases.', I don't know why.

Re: The algorithm failed on one or more cases.  

  By: giansteve on July 13, 2023, 7:35 a.m.

Hello 坤坤kk,

from your last submission, the Stderr is the following:

2023-07-13T03:53:46.586000+00:00 Traceback (most recent call last):
2023-07-13T03:53:46.586000+00:00   File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main
2023-07-13T03:53:46.587000+00:00     return _run_code(code, main_globals, None,
2023-07-13T03:53:46.587000+00:00   File "/usr/local/lib/python3.9/runpy.py", line 87, in _run_code
2023-07-13T03:53:46.587000+00:00     exec(code, run_globals)
2023-07-13T03:53:46.587000+00:00   File "/opt/app/process.py", line 451, in <module>
2023-07-13T03:53:46.587000+00:00     predictor(net, input_path=input_path, output_path=output_path)
2023-07-13T03:53:46.587000+00:00   File "/opt/app/process.py", line 426, in predictor
2023-07-13T03:53:46.587000+00:00     for i_batch, sampled_batch in enumerate(testloader):
2023-07-13T03:53:46.587000+00:00   File "/home/user/.local/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 681, in __next__
2023-07-13T03:53:46.587000+00:00     data = self._next_data()
2023-07-13T03:53:46.587000+00:00   File "/home/user/.local/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 1359, in _next_data
2023-07-13T03:53:46.587000+00:00     idx, data = self._get_data()
2023-07-13T03:53:46.587000+00:00   File "/home/user/.local/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 1325, in _get_data
2023-07-13T03:53:46.587000+00:00     success, data = self._try_get_data()
2023-07-13T03:53:46.587000+00:00   File "/home/user/.local/lib/python3.9/site-packages/torch/utils/data/dataloader.py", line 1176, in _try_get_data
2023-07-13T03:53:46.587000+00:00     raise RuntimeError('DataLoader worker (pid(s) {}) exited unexpectedly'.format(pids_str)) from e
2023-07-13T03:53:46.587000+00:00 RuntimeError: DataLoader worker (pid(s) 36) exited unexpectedly

and it produced the following message: RuntimeError: DataLoader worker (pid(s) 36) exited unexpectedly

I hope it helps Best Gian Marco

Re: The algorithm failed on one or more cases.  

  By: 坤坤kk on July 13, 2023, 8:30 a.m.

Thanks for your reply! I wonder why you quit unexpectedly? I can run smoothly and predict it locally. Can you retest it for me? Since I output the prediction results to the "/output/' folder, there may be a situation where 'images/aorta-segmentation' is empty, please go to "/output/' folder to view my output and perform the indicator calculation.

Thank you so much!!!

Re: The algorithm failed on one or more cases.  

  By: apepe on July 13, 2023, 9:25 a.m.

Hi,

you might try by reducing the number of workers in your DataLoader or let your code produce customized errors/exceptions -- we currently do not see more than the provided log.

About the paths/interfaces, the algorithm will only work if they are set as in the provided template. It is a requirement of Grand-Challenge.

Best, Antonio

Re: The algorithm failed on one or more cases.  

  By: 坤坤kk on July 16, 2023, 1:44 a.m.

Hello, can you take a look at the latest submitted bug?

Re: The algorithm failed on one or more cases.  

  By: giansteve on July 17, 2023, 7:29 a.m.

Hi,

Your last submission on July 15, 6:47 PM gave the following message: "Reason: No such file or directory". With the following Traceback error:

2023-07-15T16:53:02.193000+00:00 Traceback (most recent call last):
2023-07-15T16:53:02.193000+00:00   File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main
2023-07-15T16:53:02.193000+00:00     return _run_code(code, main_globals, None,
2023-07-15T16:53:02.193000+00:00   File "/usr/local/lib/python3.9/runpy.py", line 87, in _run_code
2023-07-15T16:53:02.193000+00:00     exec(code, run_globals)
2023-07-15T16:53:02.193000+00:00   File "/opt/app/process.py", line 443, in <module>
2023-07-15T16:53:02.193000+00:00     predictor(net, input_path=input_path, output_path=output_path)
2023-07-15T16:53:02.193000+00:00   File "/opt/app/process.py", line 425, in predictor
2023-07-15T16:53:02.193000+00:00     predictor_single_volume(image, net, patch_size=[224, 224],
2023-07-15T16:53:02.193000+00:00   File "/opt/app/process.py", line 406, in predictor_single_volume
2023-07-15T16:53:02.193000+00:00     sitk.WriteImage(resample_image,
2023-07-15T16:53:02.193000+00:00   File "/home/user/.local/lib/python3.9/site-packages/SimpleITK/extra.py", line 405, in WriteImage
2023-07-15T16:53:02.193000+00:00     return writer.Execute(image)
2023-07-15T16:53:02.193000+00:00   File "/home/user/.local/lib/python3.9/site-packages/SimpleITK/SimpleITK.py", line 7913, in Execute
2023-07-15T16:53:02.193000+00:00     return _SimpleITK.ImageFileWriter_Execute(self, *args)
2023-07-15T16:53:02.193000+00:00 RuntimeError: Exception thrown in SimpleITK ImageFileWriter_Execute: /tmp/SimpleITK-build/ITK/Modules/IO/Meta/src/itkMetaImageIO.cxx:1103:
2023-07-15T16:53:02.193000+00:00 ITK ERROR: MetaImageIO(0x555a1760da90): File cannot be written: /output/images/aorta-segmentation/bc5eae0e-1bc8-468a-98a2-00547e42ed2c.mha
2023-07-15T16:53:02.193000+00:00 Reason: No such file or directory

Best Gian Marco

Re: The algorithm failed on one or more cases.  

  By: 坤坤kk on July 17, 2023, 9:27 a.m.

Hello, thanks for your answer!

Should I output the segmentation predictions to the "/output/images/aorta-segmentation/" folder? If yes, how can I fix this? It looks like this issue should not be on my side.

I hope your answer can help me, thank you very much!!

Re: The algorithm failed on one or more cases.  

  By: apepe on July 17, 2023, 11:32 a.m.

Hi,

In the template container (Dockerfile, process.py) there are the creation and permissions for /output and subfolders.

It appears like this might have been modified in your implementation? If so, you should add the folder creation.

Best, Antonio

Re: The algorithm failed on one or more cases.  

  By: 坤坤kk on July 17, 2023, 11:50 a.m.

Hello. I created subfolders in the process.py, but I don't have permission to write predictions into it. Here's what my Dockerfile and process.py are about, and I'd like you to help me see how I can fix it.

Dockerfile: RUN mkdir -p /opt/app /input /output \ && chown user:user /opt/app /input /output USER user WORKDIR /opt/app .......

process.py: output_path = "output/images/aorta-segmentation" if not os.path.exists(output_path): os.makedirs(output_path) .....

Thank you so much!!

Re: The algorithm failed on one or more cases.  

  By: apepe on July 17, 2023, 12:55 p.m.

Hi,

In your process.py you have a typo in the path

YOURS: outputpath = "output/images/aorta-segmentation"

CORRECTED: outputpath = "/output/images/aorta-segmentation"