Submission runs fine locally but smoketest fials

here is the error:

  • submission_files=‘Archive contains:
    assets/
    data/
    main.py
    data/smoke_test_labels.csv
    data/test_features.csv
    data/submission_format.csv
    assets/model_weights.pth
    Total 7 entries (501215859 bytes)’
  • grep -q main.py
  • echo ‘Unpacking submission’
    Unpacking submission
  • unzip ./submission/submission.zip -d ./
    Archive: ./submission/submission.zip
    creating: ./assets/
    inflating: ./main.py
    error: cannot create ./data/smoke_test_labels.csv
    Read-only file system
    replace ./data/test_features.csv? [y]es, [n]o, [A]ll, [N]one, [r]ename: NULL
    (EOF or read error, treating as “[N]one” …)
    inflating: ./assets/model_weights.pth

Hi @AngeloKitio! The submission is failing because it is attempting to save to the data directory, which is read-only in the code execution runtime. Your zipped submission should not include any files saved under data/. data/submission_format.csv and data/test_features.csv will already exist in the runtime.

To run your submission locally, you can save files in your local data folder rather than including those files in your zipped submission.

Hello, Thank you for your help. That seems to have solved my problem. However, I encountered another issue:

OSError: We couldn’t connect to ‘https://huggingface.co’ to load this file, couldn’t find it in the cached files and it looks like roberta-base is not the path to a directory containing a file named config.json.
Checkout your internet connection or see how to run the library in offline mode at ‘Installation’.

any advice on this one?

@AngeloKitio good question. There is no internet access in the runtime, so any pretrained models you wish to use should be included in your submission.zip file. There are more details on the code submission page, and an example of how to download and include model weights in the benchmark blog post.

I have dowloaded all the necessary files butstill got this error OSError: We couldn’t connect to ‘https://huggingface.co’ to load this file, couldn’t find it in the cached files and it looks like submission/assets is not the path to a directory containing a file named config.json.

@AngeloKitio This means your submission is still trying to access the internet, because it does not have all of the modeling files it needs to load the pre-trained model. I would suggest revisiting the way that you are downloading the model and loading it in the runtime, to make sure that you have all the necessary model files.

You could also check this locally by attempting to run your code with Wi-Fi turned off on your computer.