{
  "id": 187473,
  "title": "Submission Scoring Error",
  "url": "/competitions/rsna-str-pulmonary-embolism-detection/discussion/187473",
  "author_name": "Kerem Turgutlu",
  "post_date": "2020-09-29T05:16:16.981000",
  "votes": 3,
  "comment_count": 2,
  "views": 0,
  "content": "<p>I am constantly getting submission scoring error while trying to submit output of this <a href=\"https://www.kaggle.com/keremt/03-baseline-inference?scriptVersionId=43663713\" target=\"_blank\">notebook</a>. I checked out this <a href=\"https://www.kaggle.com/code-competition-debugging\" target=\"_blank\">help page</a> and it seems like the problem shouldn't be about memory, broken code, time exceed etc..</p>\n<p>The real interesting part is that, I am getting this error after ~7 mins after submission but actual notebook takes around ~40 mins to run. Isn't it supposed to be approx 3x slower. If my prediction generation function <code>get_preds()</code> was the problem and if it was exiting earlier before completing the whole hidden test set, hence the 7 mins, then shouldn't the error message need to be something like Notebook Threw Exception or Notebook Exceeded Allowed Compute. I am very confused here.</p>\n<p>I am just trying to make this simple submission notebook work for the past 2 days, spent a lot of time, tried different ways of submitting. Appreciate all the help!</p>",
  "messages": [
    {
      "id": 1030919,
      "postDate": "2020-09-29T05:16:16.980Z",
      "content": "<p>I am constantly getting submission scoring error while trying to submit output of this <a href=\"https://www.kaggle.com/keremt/03-baseline-inference?scriptVersionId=43663713\" target=\"_blank\">notebook</a>. I checked out this <a href=\"https://www.kaggle.com/code-competition-debugging\" target=\"_blank\">help page</a> and it seems like the problem shouldn't be about memory, broken code, time exceed etc..</p>\n<p>The real interesting part is that, I am getting this error after ~7 mins after submission but actual notebook takes around ~40 mins to run. Isn't it supposed to be approx 3x slower. If my prediction generation function <code>get_preds()</code> was the problem and if it was exiting earlier before completing the whole hidden test set, hence the 7 mins, then shouldn't the error message need to be something like Notebook Threw Exception or Notebook Exceeded Allowed Compute. I am very confused here.</p>\n<p>I am just trying to make this simple submission notebook work for the past 2 days, spent a lot of time, tried different ways of submitting. Appreciate all the help!</p>",
      "rawMarkdown": "I am constantly getting submission scoring error while trying to submit output of this [notebook](https://www.kaggle.com/keremt/03-baseline-inference?scriptVersionId=43663713). I checked out this [help page](https://www.kaggle.com/code-competition-debugging) and it seems like the problem shouldn't be about memory, broken code, time exceed etc..\n\nThe real interesting part is that, I am getting this error after ~7 mins after submission but actual notebook takes around ~40 mins to run. Isn't it supposed to be approx 3x slower. If my prediction generation function `get_preds()` was the problem and if it was exiting earlier before completing the whole hidden test set, hence the 7 mins, then shouldn't the error message need to be something like Notebook Threw Exception or Notebook Exceeded Allowed Compute. I am very confused here.\n\nI am just trying to make this simple submission notebook work for the past 2 days, spent a lot of time, tried different ways of submitting. Appreciate all the help!",
      "votes": 3
    },
    {
      "id": 1030983,
      "postDate": "2020-09-29T06:24:34.880Z",
      "content": "<p><a href=\"https://www.kaggle.com/keremt\" target=\"_blank\">@keremt</a> If your code fails at inference, at this line <code>preds, targs = learn.get_preds(dl=test_dl)</code> for some reason, the notebook will continue to the next cell and will write a submission file but it will not be in the right format.</p>\n<p>To understand where it fails, you can try something like this:<br>\nat the beginning of the inference cell add <code>fail_here=0</code> and at the end add <code>fail_here=1</code> (the 2nd line must be at the same cell as the inference).<br>\nat the cell where you write the submission file, do something like:</p>\n<pre><code>If fail_here==0:\n     write sample_submission\nelif fail_here==1:\n    write my_submissiion\n</code></pre>\n<p>now when you run your code, if you get the sample submission score, you'll know it failed at the inference cell (You'll still need to explore why)</p>",
      "rawMarkdown": "@keremt If your code fails at inference, at this line `preds, targs = learn.get_preds(dl=test_dl)` for some reason, the notebook will continue to the next cell and will write a submission file but it will not be in the right format.\n\nTo understand where it fails, you can try something like this:\nat the beginning of the inference cell add `fail_here=0` and at the end add `fail_here=1` (the 2nd line must be at the same cell as the inference).\nat the cell where you write the submission file, do something like:\n\n```\nIf fail_here==0:\n     write sample_submission\nelif fail_here==1:\n    write my_submissiion\n```\n\nnow when you run your code, if you get the sample submission score, you'll know it failed at the inference cell (You'll still need to explore why)",
      "votes": 4,
      "replies": [
        {
          "id": 1031750,
          "postDate": "2020-09-29T17:05:38.017Z",
          "content": "<p>Thanks! This is actually a pretty good strategy :)</p>\n<pre><code>fail_here=0\nraise Exception\nfail_here=1\n</code></pre>",
          "rawMarkdown": "Thanks! This is actually a pretty good strategy :)\n\n```\nfail_here=0\nraise Exception\nfail_here=1\n```"
        }
      ]
    }
  ],
  "comments": [
    {
      "id": 1030983,
      "author_name": "yuval reina",
      "author_url": "",
      "post_date": "2020-09-29T06:24:34.880000",
      "content": "<p><a href=\"https://www.kaggle.com/keremt\" target=\"_blank\">@keremt</a> If your code fails at inference, at this line <code>preds, targs = learn.get_preds(dl=test_dl)</code> for some reason, the notebook will continue to the next cell and will write a submission file but it will not be in the right format.</p>\n<p>To understand where it fails, you can try something like this:<br>\nat the beginning of the inference cell add <code>fail_here=0</code> and at the end add <code>fail_here=1</code> (the 2nd line must be at the same cell as the inference).<br>\nat the cell where you write the submission file, do something like:</p>\n<pre><code>If fail_here==0:\n     write sample_submission\nelif fail_here==1:\n    write my_submissiion\n</code></pre>\n<p>now when you run your code, if you get the sample submission score, you'll know it failed at the inference cell (You'll still need to explore why)</p>",
      "votes": 4,
      "replies": [
        {
          "id": 1031750,
          "author_name": "Kerem Turgutlu",
          "author_url": "",
          "post_date": "2020-09-29T17:05:38.017000",
          "content": "<p>Thanks! This is actually a pretty good strategy :)</p>\n<pre><code>fail_here=0\nraise Exception\nfail_here=1\n</code></pre>",
          "votes": 0,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1030919": "I am constantly getting submission scoring error while trying to submit output of this [notebook](https://www.kaggle.com/keremt/03-baseline-inference?scriptVersionId=43663713). I checked out this [help page](https://www.kaggle.com/code-competition-debugging) and it seems like the problem shouldn't be about memory, broken code, time exceed etc..\n\nThe real interesting part is that, I am getting this error after ~7 mins after submission but actual notebook takes around ~40 mins to run. Isn't it supposed to be approx 3x slower. If my prediction generation function `get_preds()` was the problem and if it was exiting earlier before completing the whole hidden test set, hence the 7 mins, then shouldn't the error message need to be something like Notebook Threw Exception or Notebook Exceeded Allowed Compute. I am very confused here.\n\nI am just trying to make this simple submission notebook work for the past 2 days, spent a lot of time, tried different ways of submitting. Appreciate all the help!",
    "1030983": "@keremt If your code fails at inference, at this line `preds, targs = learn.get_preds(dl=test_dl)` for some reason, the notebook will continue to the next cell and will write a submission file but it will not be in the right format.\n\nTo understand where it fails, you can try something like this:\nat the beginning of the inference cell add `fail_here=0` and at the end add `fail_here=1` (the 2nd line must be at the same cell as the inference).\nat the cell where you write the submission file, do something like:\n\n```\nIf fail_here==0:\n     write sample_submission\nelif fail_here==1:\n    write my_submissiion\n```\n\nnow when you run your code, if you get the sample submission score, you'll know it failed at the inference cell (You'll still need to explore why)"
  }
}