{
  "id": 406900,
  "title": "Loading custom models",
  "url": "/competitions/image-matching-challenge-2023/discussion/406900",
  "author_name": "",
  "post_date": "2023-05-04T09:59:08.302549700Z",
  "votes": null,
  "comment_count": 2,
  "views": 0,
  "content": "<p>Hello, I'm new to kaggle. How do you use custom trained models to generate submissions? I managed to upload a model with the \"Add Data\" button, and it works on the training data, but it doesn't work on the test data. Is the custom input still available to the notebook while generating the test submission? Similarly, can you load code from github repositories with the interned access turned off?</p>",
  "messages": [
    {
      "id": "2245342",
      "postDate": "05/04/2023 09:59:08",
      "content": "<p>Hello, I'm new to kaggle. How do you use custom trained models to generate submissions? I managed to upload a model with the \"Add Data\" button, and it works on the training data, but it doesn't work on the test data. Is the custom input still available to the notebook while generating the test submission? Similarly, can you load code from github repositories with the interned access turned off?</p>",
      "rawMarkdown": "Hello, I'm new to kaggle. How do you use custom trained models to generate submissions? I managed to upload a model with the \"Add Data\" button, and it works on the training data, but it doesn't work on the test data. Is the custom input still available to the notebook while generating the test submission? Similarly, can you load code from github repositories with the interned access turned off?",
      "votes": null
    },
    {
      "id": "2245393",
      "postDate": "05/04/2023 10:32:55",
      "content": "<p>Please display your code, it is better for understanding.</p>",
      "rawMarkdown": "Please display your code, it is better for understanding.",
      "votes": null
    },
    {
      "id": "2245575",
      "postDate": "05/04/2023 12:58:13",
      "content": "<p>So I wanted to load a github code into my notebook. As mentioned in my original question, I added it to the notebook Data, because the internet access has to be turned off. Therefore, it is located in the /kaggle/input directory. Next I wanted to install the module provided by the github repo.</p>\n<pre><code>%cd /kaggle/working/\n!rm -rf /kaggle/working/somecode\n!cp -r /kaggle/input/somecode .\n%cd /kaggle/working/somecode\n\n!pip install -e .\n\n# Do some imports\n\n%cd /kaggle/working/\n</code></pre>\n<p>This code works when I run it on the training dataset, but it results in a failed submission when added to a working random submission code. The submission fails even without the \"!pip install -e .\" step. The submission fails because: \"Submission CSV Not Found\". </p>\n<p>From <a href=\"https://www.kaggle.com/code-competition-debugging:\" target=\"_blank\">https://www.kaggle.com/code-competition-debugging:</a><br>\n\"Submission CSV Not Found: Your notebook did not output the expected submission file (often submission.csv). The rerun of your notebook appears to have completed, but when we looked for your submission file, it wasn't there. This means it's possible to have bugs/errors upstream that halted execution and prevented the file from being written. Attempting to read a non-existent directory/file from a dataset is a common reason execution is halted (causing either Submission CSV Not Found or Notebook Threw Exception).\"</p>\n<p>So I assume my added directories/files don't exist when the test submission is run. Hence my question: can you add your models or other files to be used by the submission notebooks?</p>",
      "rawMarkdown": "So I wanted to load a github code into my notebook. As mentioned in my original question, I added it to the notebook Data, because the internet access has to be turned off. Therefore, it is located in the /kaggle/input directory. Next I wanted to install the module provided by the github repo.\n\n```\n%cd /kaggle/working/\n!rm -rf /kaggle/working/somecode\n!cp -r /kaggle/input/somecode .\n%cd /kaggle/working/somecode\n\n!pip install -e .\n\n# Do some imports\n\n%cd /kaggle/working/\n```\n\nThis code works when I run it on the training dataset, but it results in a failed submission when added to a working random submission code. The submission fails even without the \"!pip install -e .\" step. The submission fails because: \"Submission CSV Not Found\". \n\nFrom https://www.kaggle.com/code-competition-debugging:\n\"Submission CSV Not Found: Your notebook did not output the expected submission file (often submission.csv). The rerun of your notebook appears to have completed, but when we looked for your submission file, it wasn't there. This means it's possible to have bugs/errors upstream that halted execution and prevented the file from being written. Attempting to read a non-existent directory/file from a dataset is a common reason execution is halted (causing either Submission CSV Not Found or Notebook Threw Exception).\"\n\nSo I assume my added directories/files don't exist when the test submission is run. Hence my question: can you add your models or other files to be used by the submission notebooks?",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 2245393,
      "author_name": "catadanna",
      "author_url": "",
      "post_date": "05/04/2023 10:32:55",
      "content": "<p>Please display your code, it is better for understanding.</p>",
      "votes": null,
      "replies": [
        {
          "id": 2245575,
          "author_name": "ramusz",
          "author_url": "",
          "post_date": "05/04/2023 12:58:13",
          "content": "<p>So I wanted to load a github code into my notebook. As mentioned in my original question, I added it to the notebook Data, because the internet access has to be turned off. Therefore, it is located in the /kaggle/input directory. Next I wanted to install the module provided by the github repo.</p>\n<pre><code>%cd /kaggle/working/\n!rm -rf /kaggle/working/somecode\n!cp -r /kaggle/input/somecode .\n%cd /kaggle/working/somecode\n\n!pip install -e .\n\n# Do some imports\n\n%cd /kaggle/working/\n</code></pre>\n<p>This code works when I run it on the training dataset, but it results in a failed submission when added to a working random submission code. The submission fails even without the \"!pip install -e .\" step. The submission fails because: \"Submission CSV Not Found\". </p>\n<p>From <a href=\"https://www.kaggle.com/code-competition-debugging:\" target=\"_blank\">https://www.kaggle.com/code-competition-debugging:</a><br>\n\"Submission CSV Not Found: Your notebook did not output the expected submission file (often submission.csv). The rerun of your notebook appears to have completed, but when we looked for your submission file, it wasn't there. This means it's possible to have bugs/errors upstream that halted execution and prevented the file from being written. Attempting to read a non-existent directory/file from a dataset is a common reason execution is halted (causing either Submission CSV Not Found or Notebook Threw Exception).\"</p>\n<p>So I assume my added directories/files don't exist when the test submission is run. Hence my question: can you add your models or other files to be used by the submission notebooks?</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "2245342": "Hello, I'm new to kaggle. How do you use custom trained models to generate submissions? I managed to upload a model with the \"Add Data\" button, and it works on the training data, but it doesn't work on the test data. Is the custom input still available to the notebook while generating the test submission? Similarly, can you load code from github repositories with the interned access turned off?",
    "2245393": "Please display your code, it is better for understanding.",
    "2245575": "So I wanted to load a github code into my notebook. As mentioned in my original question, I added it to the notebook Data, because the internet access has to be turned off. Therefore, it is located in the /kaggle/input directory. Next I wanted to install the module provided by the github repo.\n\n```\n%cd /kaggle/working/\n!rm -rf /kaggle/working/somecode\n!cp -r /kaggle/input/somecode .\n%cd /kaggle/working/somecode\n\n!pip install -e .\n\n# Do some imports\n\n%cd /kaggle/working/\n```\n\nThis code works when I run it on the training dataset, but it results in a failed submission when added to a working random submission code. The submission fails even without the \"!pip install -e .\" step. The submission fails because: \"Submission CSV Not Found\". \n\nFrom https://www.kaggle.com/code-competition-debugging:\n\"Submission CSV Not Found: Your notebook did not output the expected submission file (often submission.csv). The rerun of your notebook appears to have completed, but when we looked for your submission file, it wasn't there. This means it's possible to have bugs/errors upstream that halted execution and prevented the file from being written. Attempting to read a non-existent directory/file from a dataset is a common reason execution is halted (causing either Submission CSV Not Found or Notebook Threw Exception).\"\n\nSo I assume my added directories/files don't exist when the test submission is run. Hence my question: can you add your models or other files to be used by the submission notebooks?"
  },
  "source": "meta"
}