The algorithm failed on one or more cases

The algorithm failed on one or more cases  

  By: zjh221149 on July 20, 2023, 9:38 a.m.

Dear organizers,

Thanks for hosting this challenge.

After submission, I encountered the problem "The algorithm failed on one or more cases."

I could get the algorithm passed offline and have no idea about what had gone wrong.

Could you help me to solve the problem?

Best regards

Re: The algorithm failed on one or more cases  

  By: apepe on July 20, 2023, 10:09 a.m.

Hi,

It appears to be a "minor issue": Output file 'aortic-vessel-tree.obj' was not produced

You need to produce three files even if you participate only to the main task.

If you wish to participate only to the main task (or only one subtask) just save a cube (trimesh.primitives.Box()) as in the template https://github.com/apepe91/SEGA2023/blob/cea33df9d118dc30c8bdfec58962256797cdfbc3/SegaAlgorithm/process.py#L66C20-L66C27

This should fix your issue

Best, Antonio

Re: The algorithm failed on one or more cases  

  By: zjh221149 on July 20, 2023, 3:53 p.m.

Thank you for answering me. About the outputs, did my container gave the output for the main task correctly?

Re: The algorithm failed on one or more cases  

  By: zjh221149 on July 20, 2023, 4:05 p.m.

And I've got another "The algorithm failed on one or more cases", could you tell me what the error log is on this newer submission? Also, what file should I browse into the Supplementary File column? If I load the algorithm image successfully, do I still have to browse any files into it?

Best regards

 Last edited by: zjh221149 on Aug. 15, 2023, 12:58 p.m., edited 2 times in total.

Re: The algorithm failed on one or more cases  

  By: apepe on July 21, 2023, 2:15 p.m.

Hi,

About your first question, there was no output saved (grand challenge only completes if all files are there).

About the second question, the error message is unclear. It says the algorithm tried to load a folder, but that shouldn't cause a critical error if you used the template algorithm. It makes me wonder if it was a silent crash of the process.

Let me know if it persist.

Antonio

Re: The algorithm failed on one or more cases  

  By: zjh221149 on July 21, 2023, 3:57 p.m.

Thanks for the information!

Could you please send me the error message? I did use the template algorithm to create the container, and I wonder where the "folder" come from.

Are the test files that uploaded into the container .mha files? I load files with: "inputimage, inputimagefilepath = self.loadinput_image(case=case)", which is from the SEGA2023 template. And my container could successfully run locally with .mha, .nrrd and .mhd input files.

The submission page refused me to submit the same container again, and it didn't report error on my computer. Could you start my latest submission's testing process again?

 Last edited by: zjh221149 on Aug. 15, 2023, 12:58 p.m., edited 1 time in total.

Re: The algorithm failed on one or more cases  

  By: zjh221149 on July 22, 2023, 2:45 p.m.

Hi,

I posted a new submission, and the error persists.

About the template algorithm, there are something confusing to me: the input path in process.py is "input_path=Path('/input/images/ct/'),", but in test.sh, there is "-v $SCRIPTPATH/test/:/input/ \" , these two paths doesn't match.

If I don't change the input_path in process.py, the container image built upon it can't work with the test.sh, only if I changed the input_path into "input_path=Path('/input/')," the test.sh could run successfully.

I noticed the request: "CT Image (Image) at /input/images/ct/.mha or /input/images/ct/.tif", so I set the input_path in process.py '/input/images/ct/'. However, the submission still recalled "The algorithm failed on one or more cases.".

Re: The algorithm failed on one or more cases  

  By: kabbas5707efb29ff33724134 on July 22, 2023, 5:18 p.m.

You can change the test.sh to run it locally on your system, but you cannot change the process.py. Keep the paths in process.py the same as they are, and also, the docker file is now updated. Maybe you can use the new one.

I had the same issues, and they are now solved by these steps; I hope it will help. Cheers Abbas

 Last edited by: kabbas5707efb29ff33724134 on Aug. 15, 2023, 12:58 p.m., edited 1 time in total.

Re: The algorithm failed on one or more cases  

  By: zjh221149 on July 23, 2023, 3:05 a.m.

Dear Abbas, Thanks for your advice!

Did you only change the predict function of process.py and the "COPY --chown=user:user process.py /opt/app/" part of dockerfile, and left other parts the same as the template? I downloaded the newest version of the template, and I only changed these two parts. But the test failed again.

Re: The algorithm failed on one or more cases  

  By: kabbas5707efb29ff33724134 on July 23, 2023, 11:35 a.m.

For the Docker file, I added this part and any weights file the network uses.

RUN mkdir -p /input/images/ct/ \ && chown user:user /input/images/ct/

COPY --chown=user:user test/ /input/images/ct/

Maybe you need to create more directories depending on your architecture. And for process.py, the original template should also be intact, and on the top, you can add again depending on your architecture.

Re: The algorithm failed on one or more cases  

  By: zjh221149 on July 23, 2023, 3:33 p.m.

Thanks for further information!

There's something confusing: when running on the try-out algorithm of grand challenge, the algorithm failed with an error said" Could not clean '/input' and/or '/output' directories: [Errno 13] Permission denied: 'ct' ", and the submission failed, too. Did you ran into the same issue while testing your algorithm?

Thanks again! It really helped a lot.

Re: The algorithm failed on one or more cases  

  By: apepe on July 24, 2023, 9:35 a.m.

Hi,

did you perhaps modify the loading and permissions to /input ?

/input in the test.sh file and /input/images/ct in the process.py is correct

in test.sh we are mounting the directory, in process.py we simply access a subdirectory.

Antonio

Re: The algorithm failed on one or more cases  

  By: zjh221149 on July 24, 2023, 10:36 a.m.

Thanks for the information!

I noticed this issue and restored the process.py into the template version.

However, the new submissions failed again, making me think that maybe the current error isn't about the paths.

Could you please send me the error log of the latest submission that was submitted on July 24,2023,8:36 a.m.?

 Last edited by: zjh221149 on Aug. 15, 2023, 12:58 p.m., edited 3 times in total.

Re: The algorithm failed on one or more cases  

  By: apepe on July 24, 2023, 1:22 p.m.

Hi,

unfortunately the submission did not produce any log, I am not able to tell you more about the failure.

I noticed that the algorithm was executed correctly on the first case, but it failed on the second case. Therefore the issue might to be related to the execution number, volume size, ...

I hope this helps you

Antonio

Re: The algorithm failed on one or more cases  

  By: zjh221149 on July 24, 2023, 2:23 p.m.

Thanks for helping me!

Could you please tell me the size of the two test files? Maybe it’s the file size .

Also, did the submission printed any information out while testing ?The output script may tell something.

 Last edited by: zjh221149 on Aug. 15, 2023, 12:58 p.m., edited 1 time in total.