- main
- tee /code_execution/submission/log.txt
- expected_filename=main.py
- cd /code_execution
++ zip -sf ./submission/submission.zip - submission_files=‘Archive contains:
submission/
submission/data/
submission/data/submission_format.csv
submission/data/test_features.csv
submission/main.py
Total 5 entries (61900 bytes)’ - grep -q main.py
- echo ‘Unpacking submission’
Unpacking submission - unzip ./submission/submission.zip -d ./
Archive: ./submission/submission.zip
creating: ./submission/data/
inflating: ./submission/data/submission_format.csv
inflating: ./submission/data/test_features.csv
inflating: ./submission/main.py - ls -alh
total 228K
drwxr-xr-x 1 runtimeuser runtimeuser 4.0K Oct 23 14:16 .
drwxr-xr-x 1 root root 4.0K Oct 23 14:16 …
drwxr-xr-x 3 runtimeuser runtimeuser 4.0K Oct 17 18:38 .pixi
drwxrwxrwx 2 root root 4.0K Oct 23 14:16 data
-rw-r–r-- 1 root root 205K Oct 17 18:38 pixi.lock
-rw-r–r-- 1 root root 1.6K Oct 17 18:38 pixi.toml
drwxrwxrwx 2 root root 4.0K Oct 23 14:16 submission
drwxr-xr-x 2 runtimeuser runtimeuser 4.0K Oct 17 18:38 tests - true
- echo ‘Running smoke test’
Running smoke test - pixi run -e gpu python main.py
/code_execution/.pixi/envs/gpu/bin/python: can’t open file ‘/code_execution/main.py’: [Errno 2] No such file or directory
How to debug it?
@NITYAM It’s hard to know without seeing your main.py
file. Are these logs from testing a submission locally, or submitting a smoke test on the competition platform?
If this is a smoke test submission, the fact that you are including the test features and submission format in your submission.zip
may be causing issues.
inflating: ./submission/data/submission_format.csv
inflating: ./submission/data/test_features.csv
The submission format and test features will be available in the code execution runtime, and should not be included in your submission.zip
. I hope this helps!
Hi @NITYAM,
Based on what I’m seeing from this part of the logs:
unzip ./submission/submission.zip -d ./
Archive: ./submission/submission.zip
creating: ./submission/data/
inflating: ./submission/data/submission_format.csv
inflating: ./submission/data/test_features.csv
inflating: ./submission/main.py
It looks like your ZIP archive is not quite in the expected format. We expect the main.py
file in the archive root, but you have it nested inside a folder at submission/main.py
. See this thread—which had the same issue—for more detail on ways to correctly structure your submission files.
- main
- tee /code_execution/submission/log.txt
- expected_filename=main.py
- cd /code_execution
++ zip -sf ./submission/submission.zip - submission_files=‘Archive contains:
assets/label_encoders.joblib
assets/other_model.h5
assets/special_model.h5
assets/tokenizer.joblib
main.py
Total 5 entries (25315807 bytes)’ - grep -q main.py
- echo ‘Unpacking submission’
Unpacking submission - unzip ./submission/submission.zip -d ./
Archive: ./submission/submission.zip
extracting: ./assets/label_encoders.joblib
extracting: ./assets/other_model.h5
extracting: ./assets/special_model.h5
extracting: ./assets/tokenizer.joblib
extracting: ./main.py - ls -alh
total 236K
drwxr-xr-x 1 runtimeuser runtimeuser 4.0K Oct 26 12:53 .
drwxr-xr-x 1 root root 4.0K Oct 26 12:53 …
drwxr-xr-x 3 runtimeuser runtimeuser 4.0K Oct 17 18:38 .pixi
drwxr-xr-x 2 runtimeuser runtimeuser 4.0K Oct 26 12:53 assets
drwxrwxrwx 2 root root 4.0K Oct 26 12:53 data
-rw-rw-rw- 1 runtimeuser runtimeuser 2.6K Oct 26 2024 main.py
-rw-r–r-- 1 root root 205K Oct 17 18:38 pixi.lock
-rw-r–r-- 1 root root 1.6K Oct 17 18:38 pixi.toml
drwxrwxrwx 2 root root 4.0K Oct 26 12:53 submission
drwxr-xr-x 2 runtimeuser runtimeuser 4.0K Oct 17 18:38 tests - true
- echo ‘Running smoke test’
Running smoke test - pixi run -e gpu python main.py
Traceback (most recent call last):
File “/code_execution/main.py”, line 5, in
from tensorflow.keras.models import load_model
ModuleNotFoundError: No module named ‘tensorflow’ now giving me this error on my subbmission
@NITYAM This is because the code execution runtime does not currently include the tensorflow
package. There are instructions in the runtime repository about how to add a package.
There is currently an open pull request to add tensorflow to the runtime, so once that is merged your code should be able to access tensorflow.