Submissions are failing

Thank you for hosting this impactful competition.

My submissions keep failing. To troubleshoot the problem I’ve been trying to submit the example_submission main.py file that’s provided in the competition GitHub repo.

The steps I’ve followed are as follows:

  1. Create a folder named “submission”
  2. Put the example main.py file inside the “submission” folder
  3. Put a folder named “assets” inside the submission folder
  4. Zip the submission folder so that it’s named “submission.zip”
  5. Submit to the competition

The submission fails when the submission status reaches “scoring”. This happens for both the normal submission and the smoke test submission. Although the smoke test submission fails during the scoring, the error message in the log is always:

/code_execution/.pixi/envs/gpu/bin/python: can’t open file ‘/code_execution/main.py’: [Errno 2] No such file or directory

Is the submission process I’m following incorrect? It’s also possible that there’s an issue with the example main.py file or there’s a bug in the submission system.

Hi @vbookshelf ! From looking through your smoke test logs, it seems like your main.py file may not be at the root level within submission.zip. The logs show everything being inside of ./_MACOSX/submission or ./submission rather than at the top level. In your smoke test logs (id-267514), it says:

Unpacking submission
+ unzip ./submission/submission.zip -d ./
Archive:  ./submission/submission.zip
  ...
  inflating: ./submission/main.py    
  inflating: ./__MACOSX/submission/._main.py  

A file named main.py must exist at the root level of your zipped archive. So for a correctly formatted submission, the logs will show:

  inflating: ./main.py 

It’s possible there is something happening during the creation of the zip archive that is adding nested directories. I’d recommend using the make pack-submission command and instructions from the runtime repository to create submission.zip. You can also test it locally before submitting to the platform to make sure it runs correctly.

1 Like

1. Create a folder named “submission”

4. Zip the submission folder so that it’s named “submission.zip”

One common gotcha is that right-clicking on the submission/ folder and using your OS’s Compress "submission" (on macOS) or Compressed (zipped) folder (on Windows) will typically create an archive where the folder itself is at the archive root (so you end up with ./submission/main.py rather than ./main.py like @kwetstone described). Instead, you should be inside the submission/ folder, select all of the files you want to include in your submission, and then use the right-click command.

Or, the easiest way to do this correctly is to not use the right-click ZIP creation functionality and instead use make pack-submission like @kwetstone suggests.

2 Likes

Thank you @kwetstone and @jayqi . You are correct. The error was being caused by nested folders being added when the submission folder was zipped. I’ve now been able to make a submission.

For others who may read this thread, this is how I solved the problem on Mac by using the terminal to zip the folder:

  1. Place the folder named “submission” on the Desktop
  2. Open the terminal
  3. $ cd Desktop
  4. $ zip -j submission.zip submission/*

As a side note, the example_submission main.py cannot be submitted because there’s an error in the code:

Line 19: predictions[“InjuryLocationType”] = 11
InjuryLocationType can only have values from 1 to 6.

@vbookshelf thank you for flagging the bug in the example submission! We’ll fix that ASAP.