{
  "id": 455327,
  "title": "Submission Scoring Error",
  "url": "/competitions/UBC-OCEAN/discussion/455327",
  "author_name": "samu2505",
  "post_date": "2023-11-14T08:47:01.063000",
  "votes": 4,
  "comment_count": 9,
  "views": 0,
  "content": "<p>What's causing submission scoring error? I have been trying to submit new notebooks but surprising after around 6 or 7 hours, I get a submission scoring, yet, I have been using the same inference code? Help me if you can</p>",
  "messages": [
    {
      "id": 2524455,
      "postDate": "2023-11-14T08:47:01.063Z",
      "content": "<p>What's causing submission scoring error? I have been trying to submit new notebooks but surprising after around 6 or 7 hours, I get a submission scoring, yet, I have been using the same inference code? Help me if you can</p>",
      "rawMarkdown": "What's causing submission scoring error? I have been trying to submit new notebooks but surprising after around 6 or 7 hours, I get a submission scoring, yet, I have been using the same inference code? Help me if you can",
      "votes": 4
    },
    {
      "id": 2524521,
      "postDate": "2023-11-14T10:05:23.900Z",
      "content": "<p>Did you check the sample_submission.csv file? Maybe your submission file structure is different than the sample one.</p>\n<p>Be sure that your submission file is in CSV format and remove the index from your submission file.</p>\n<blockquote>\n  <p><strong>Submission Scoring Error</strong>: Your notebook generated a submission file with incorrect format. Some examples causing this are: wrong number of rows or columns, empty values, an incorrect data type for a value, or invalid submission values from what is expected.</p>\n</blockquote>\n<p>You can read this article for more information <a href=\"https://www.kaggle.com/code-competition-debugging\" target=\"_blank\">https://www.kaggle.com/code-competition-debugging</a></p>\n<p>I hope it solves your problem. Please let me know if anything goes wrong.</p>",
      "rawMarkdown": "Did you check the sample_submission.csv file? Maybe your submission file structure is different than the sample one.\n\nBe sure that your submission file is in CSV format and remove the index from your submission file.\n\n>**Submission Scoring Error**: Your notebook generated a submission file with incorrect format. Some examples causing this are: wrong number of rows or columns, empty values, an incorrect data type for a value, or invalid submission values from what is expected.\n\nYou can read this article for more information [https://www.kaggle.com/code-competition-debugging](https://www.kaggle.com/code-competition-debugging)\n\nI hope it solves your problem. Please let me know if anything goes wrong.",
      "votes": 1,
      "replies": [
        {
          "id": 2524643,
          "postDate": "2023-11-14T12:20:21.797Z",
          "content": "<p>Oh thank you. I had been using the same inference code for submission, but then it suddenly stopped working.</p>",
          "rawMarkdown": "Oh thank you. I had been using the same inference code for submission, but then it suddenly stopped working.",
          "replies": [
            {
              "id": 2524721,
              "postDate": "2023-11-14T13:38:37.743Z",
              "content": "<p>Since I don't know your inference code, it's hard to tell the real problem. But the reason should be one of them. You can try the ways I have typed.</p>\n<p>Which inference code are you using for submission, and when did it stop working?</p>\n<p>If I get you correctly, your inference code was working before something had changed.</p>\n<p>And as always, let me know if anything goes wrong again 🙂</p>",
              "rawMarkdown": "Since I don't know your inference code, it's hard to tell the real problem. But the reason should be one of them. You can try the ways I have typed.\n\nWhich inference code are you using for submission, and when did it stop working?\n\nIf I get you correctly, your inference code was working before something had changed.\n\nAnd as always, let me know if anything goes wrong again 🙂"
            },
            {
              "id": 2525218,
              "postDate": "2023-11-14T23:15:59.240Z",
              "content": "<p>Here are the links to the inference notebooks<br>\n<a href=\"https://www.kaggle.com/code/samu2505/help-inference-submission-scoring-error\" target=\"_blank\">submission scoring error</a></p>\n<p><a href=\"https://www.kaggle.com/code/samu2505/help-patch-inference-out-of-memory\" target=\"_blank\">patch-inference-out-of-memory</a> </p>",
              "rawMarkdown": "Here are the links to the inference notebooks\n[submission scoring error](https://www.kaggle.com/code/samu2505/help-inference-submission-scoring-error)\n\n[patch-inference-out-of-memory](https://www.kaggle.com/code/samu2505/help-patch-inference-out-of-memory) \n"
            },
            {
              "id": 2525594,
              "postDate": "2023-11-15T08:26:09.590Z",
              "content": "<p>Since you use one notebook for both training and inference, your model always fits the training data when you submit your notebook.</p>\n<p>To prevent this, create a variable called is_submission in your config dict and set <strong>is_submission = False</strong>. When you want to submit your notebook, set <strong>is_submission = True</strong> as in this example notebook <a href=\"https://www.kaggle.com/code/aritrag/kerascv-train-and-infer-on-thumbnails\" target=\"_blank\">https://www.kaggle.com/code/aritrag/kerascv-train-and-infer-on-thumbnails</a></p>\n<p>I hope it solves your problem.</p>",
              "rawMarkdown": "Since you use one notebook for both training and inference, your model always fits the training data when you submit your notebook.\n\nTo prevent this, create a variable called is_submission in your config dict and set **is_submission = False**. When you want to submit your notebook, set **is_submission = True** as in this example notebook [https://www.kaggle.com/code/aritrag/kerascv-train-and-infer-on-thumbnails](https://www.kaggle.com/code/aritrag/kerascv-train-and-infer-on-thumbnails)\n\nI hope it solves your problem."
            },
            {
              "id": 2525998,
              "postDate": "2023-11-15T14:28:19.473Z",
              "content": "<p>Oh cool, I’ll try it?</p>",
              "rawMarkdown": "Oh cool, I’ll try it?"
            },
            {
              "id": 2531437,
              "postDate": "2023-11-20T07:48:47.770Z",
              "content": "<p>I actually have problem with the is_submission, if I change it to True before I submit, the submit would fail because it can not find the h5 file in the working directory. Since when is_submission is True, it would not be generated when running the notebook. How can I use it correctly for training and submition?</p>\n<blockquote>\n  <p>FileNotFoundError: [Errno 2] Unable to open file (unable to open file: name = '/kaggle/working/ucb_ocean_checkpoint.weights.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0)</p>\n</blockquote>",
              "rawMarkdown": "I actually have problem with the is_submission, if I change it to True before I submit, the submit would fail because it can not find the h5 file in the working directory. Since when is_submission is True, it would not be generated when running the notebook. How can I use it correctly for training and submition?\n\n>FileNotFoundError: [Errno 2] Unable to open file (unable to open file: name = '/kaggle/working/ucb_ocean_checkpoint.weights.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0)"
            },
            {
              "id": 2532011,
              "postDate": "2023-11-20T18:05:16.593Z",
              "content": "<p>The notebook must be saved with <code>is_submision</code> set to False. Then, <code>is_submission</code> can be set to True, the notebook added to the Data section, and saved again. This second save can then be submitted.</p>\n<p>Saving the notebook the first time saves the data so that the second save of the notebook can use that data. You must add the notebook to the Data section so that it can access the data created by the previous save.</p>",
              "rawMarkdown": "The notebook must be saved with `is_submision` set to False. Then, `is_submission` can be set to True, the notebook added to the Data section, and saved again. This second save can then be submitted.\n\nSaving the notebook the first time saves the data so that the second save of the notebook can use that data. You must add the notebook to the Data section so that it can access the data created by the previous save."
            },
            {
              "id": 2533980,
              "postDate": "2023-11-22T10:25:27.500Z",
              "content": "<p>Hi Russ, thanks a lot for your answer!</p>",
              "rawMarkdown": "Hi Russ, thanks a lot for your answer!"
            }
          ]
        }
      ]
    }
  ],
  "comments": [
    {
      "id": 2524521,
      "author_name": "Yunus Selim Aytekin",
      "author_url": "",
      "post_date": "2023-11-14T10:05:23.900000",
      "content": "<p>Did you check the sample_submission.csv file? Maybe your submission file structure is different than the sample one.</p>\n<p>Be sure that your submission file is in CSV format and remove the index from your submission file.</p>\n<blockquote>\n  <p><strong>Submission Scoring Error</strong>: Your notebook generated a submission file with incorrect format. Some examples causing this are: wrong number of rows or columns, empty values, an incorrect data type for a value, or invalid submission values from what is expected.</p>\n</blockquote>\n<p>You can read this article for more information <a href=\"https://www.kaggle.com/code-competition-debugging\" target=\"_blank\">https://www.kaggle.com/code-competition-debugging</a></p>\n<p>I hope it solves your problem. Please let me know if anything goes wrong.</p>",
      "votes": 1,
      "replies": [
        {
          "id": 2524643,
          "author_name": "samu2505",
          "author_url": "",
          "post_date": "2023-11-14T12:20:21.797000",
          "content": "<p>Oh thank you. I had been using the same inference code for submission, but then it suddenly stopped working.</p>",
          "votes": 0,
          "replies": [
            {
              "id": 2524721,
              "author_name": "Yunus Selim Aytekin",
              "author_url": "",
              "post_date": "2023-11-14T13:38:37.743000",
              "content": "<p>Since I don't know your inference code, it's hard to tell the real problem. But the reason should be one of them. You can try the ways I have typed.</p>\n<p>Which inference code are you using for submission, and when did it stop working?</p>\n<p>If I get you correctly, your inference code was working before something had changed.</p>\n<p>And as always, let me know if anything goes wrong again 🙂</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 2525218,
              "author_name": "samu2505",
              "author_url": "",
              "post_date": "2023-11-14T23:15:59.240000",
              "content": "<p>Here are the links to the inference notebooks<br>\n<a href=\"https://www.kaggle.com/code/samu2505/help-inference-submission-scoring-error\" target=\"_blank\">submission scoring error</a></p>\n<p><a href=\"https://www.kaggle.com/code/samu2505/help-patch-inference-out-of-memory\" target=\"_blank\">patch-inference-out-of-memory</a> </p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 2525594,
              "author_name": "Yunus Selim Aytekin",
              "author_url": "",
              "post_date": "2023-11-15T08:26:09.590000",
              "content": "<p>Since you use one notebook for both training and inference, your model always fits the training data when you submit your notebook.</p>\n<p>To prevent this, create a variable called is_submission in your config dict and set <strong>is_submission = False</strong>. When you want to submit your notebook, set <strong>is_submission = True</strong> as in this example notebook <a href=\"https://www.kaggle.com/code/aritrag/kerascv-train-and-infer-on-thumbnails\" target=\"_blank\">https://www.kaggle.com/code/aritrag/kerascv-train-and-infer-on-thumbnails</a></p>\n<p>I hope it solves your problem.</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 2525998,
              "author_name": "samu2505",
              "author_url": "",
              "post_date": "2023-11-15T14:28:19.473000",
              "content": "<p>Oh cool, I’ll try it?</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 2531437,
              "author_name": "Dong - CUB",
              "author_url": "",
              "post_date": "2023-11-20T07:48:47.770000",
              "content": "<p>I actually have problem with the is_submission, if I change it to True before I submit, the submit would fail because it can not find the h5 file in the working directory. Since when is_submission is True, it would not be generated when running the notebook. How can I use it correctly for training and submition?</p>\n<blockquote>\n  <p>FileNotFoundError: [Errno 2] Unable to open file (unable to open file: name = '/kaggle/working/ucb_ocean_checkpoint.weights.h5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0)</p>\n</blockquote>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 2532011,
              "author_name": "Russ Tokuyama",
              "author_url": "",
              "post_date": "2023-11-20T18:05:16.593000",
              "content": "<p>The notebook must be saved with <code>is_submision</code> set to False. Then, <code>is_submission</code> can be set to True, the notebook added to the Data section, and saved again. This second save can then be submitted.</p>\n<p>Saving the notebook the first time saves the data so that the second save of the notebook can use that data. You must add the notebook to the Data section so that it can access the data created by the previous save.</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 2533980,
              "author_name": "Dong - CUB",
              "author_url": "",
              "post_date": "2023-11-22T10:25:27.500000",
              "content": "<p>Hi Russ, thanks a lot for your answer!</p>",
              "votes": 0,
              "replies": []
            }
          ]
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "2524455": "What's causing submission scoring error? I have been trying to submit new notebooks but surprising after around 6 or 7 hours, I get a submission scoring, yet, I have been using the same inference code? Help me if you can",
    "2524521": "Did you check the sample_submission.csv file? Maybe your submission file structure is different than the sample one.\n\nBe sure that your submission file is in CSV format and remove the index from your submission file.\n\n>**Submission Scoring Error**: Your notebook generated a submission file with incorrect format. Some examples causing this are: wrong number of rows or columns, empty values, an incorrect data type for a value, or invalid submission values from what is expected.\n\nYou can read this article for more information [https://www.kaggle.com/code-competition-debugging](https://www.kaggle.com/code-competition-debugging)\n\nI hope it solves your problem. Please let me know if anything goes wrong."
  }
}