{
  "id": 527523,
  "title": "Notebook threw exception during submission",
  "url": "/competitions/rsna-2024-lumbar-spine-degenerative-classification/discussion/527523",
  "author_name": "",
  "post_date": "2024-08-12T15:46:01.083298400Z",
  "votes": null,
  "comment_count": 6,
  "views": 0,
  "content": "<p>My submission notebook keeps failing for submission.</p>\n<p>So far, I've made sure a few things:</p>\n<ul>\n<li>The exception in failing shows that \"Notebook Threw Exception\", hence it must outcome even before writing a <code>submission.csv</code> file and the format is not a problem (yet).</li>\n<li>Apart from submission, notebook committing works fine without error.</li>\n<li>Instead of using <code>test_series_descriptions.csv</code>, I tested with <code>train_series_descriptions.csv</code> to find out a problem with my code and there's no error caused.</li>\n<li>Profiled memory usage in case of leakage which leads to OOM with PyTorch's profiler, which turns out not.</li>\n<li><code>FileNotFoundError</code> should not be the case as I'm using <code>rglob</code> to read DICOM files.</li>\n</ul>\n<p>I can't think of any other potential causes. Any recommendations please?</p>",
  "messages": [
    {
      "id": "2956894",
      "postDate": "08/12/2024 15:46:01",
      "content": "<p>My submission notebook keeps failing for submission.</p>\n<p>So far, I've made sure a few things:</p>\n<ul>\n<li>The exception in failing shows that \"Notebook Threw Exception\", hence it must outcome even before writing a <code>submission.csv</code> file and the format is not a problem (yet).</li>\n<li>Apart from submission, notebook committing works fine without error.</li>\n<li>Instead of using <code>test_series_descriptions.csv</code>, I tested with <code>train_series_descriptions.csv</code> to find out a problem with my code and there's no error caused.</li>\n<li>Profiled memory usage in case of leakage which leads to OOM with PyTorch's profiler, which turns out not.</li>\n<li><code>FileNotFoundError</code> should not be the case as I'm using <code>rglob</code> to read DICOM files.</li>\n</ul>\n<p>I can't think of any other potential causes. Any recommendations please?</p>",
      "rawMarkdown": "My submission notebook keeps failing for submission.\n\nSo far, I've made sure a few things:\n- The exception in failing shows that \"Notebook Threw Exception\", hence it must outcome even before writing a `submission.csv` file and the format is not a problem (yet).\n- Apart from submission, notebook committing works fine without error.\n- Instead of using `test_series_descriptions.csv`, I tested with `train_series_descriptions.csv` to find out a problem with my code and there's no error caused.\n- Profiled memory usage in case of leakage which leads to OOM with PyTorch's profiler, which turns out not.\n- `FileNotFoundError` should not be the case as I'm using `rglob` to read DICOM files.\n\nI can't think of any other potential causes. Any recommendations please?",
      "votes": null
    },
    {
      "id": "2956940",
      "postDate": "08/12/2024 16:35:21",
      "content": "<p>hi, try these steps: optimize your code to stay within Kaggle’s limits, ensure all libraries are compatible, verify file paths, and simplify any asynchronous or multithreaded operations. If the issue persists, try transferring your code to a new notebook</p>",
      "rawMarkdown": "hi, try these steps: optimize your code to stay within Kaggle’s limits, ensure all libraries are compatible, verify file paths, and simplify any asynchronous or multithreaded operations. If the issue persists, try transferring your code to a new notebook",
      "votes": null
    },
    {
      "id": "2957007",
      "postDate": "08/12/2024 18:03:32",
      "content": "<p>check if you are getting nans as output.<br>\nyou should do submission.fillna(0.33) to address cases where your model may output NaN calues.<br>\nif you are using dictionaries ,make sure there are no KeyErrors.</p>\n<p>I have created a tiny debug dataset for this competition which can be used as drop in replacement of original competition dataset to validate against edge cases like more or less than 3-folders per study id etc.<br>\nyou can read more in related discussion.</p>\n<p><strong>Dataset Link</strong> : <a href=\"https://www.kaggle.com/datasets/rohitchaudhari25/rsna-lsdc-2024-submission-debug-dataset\" target=\"_blank\">RSNA_LSDC_2024_submission_debug_dataset</a><br>\n<strong>Notebook Link</strong>: <a href=\"https://www.kaggle.com/code/rohitchaudhari25/rsna-lsdc-2024-submission-debug/notebook\" target=\"_blank\">RSNA_LSDC_2024_submission_debug</a></p>",
      "rawMarkdown": "check if you are getting nans as output.\nyou should do submission.fillna(0.33) to address cases where your model may output NaN calues.\nif you are using dictionaries ,make sure there are no KeyErrors.\n\n\nI have created a tiny debug dataset for this competition which can be used as drop in replacement of original competition dataset to validate against edge cases like more or less than 3-folders per study id etc.\nyou can read more in related discussion.\n\n**Dataset Link** : [RSNA_LSDC_2024_submission_debug_dataset](https://www.kaggle.com/datasets/rohitchaudhari25/rsna-lsdc-2024-submission-debug-dataset)\n**Notebook Link**: [RSNA_LSDC_2024_submission_debug](https://www.kaggle.com/code/rohitchaudhari25/rsna-lsdc-2024-submission-debug/notebook)",
      "votes": null
    },
    {
      "id": "3005795",
      "postDate": "10/03/2024 10:53:44",
      "content": "<p>I am also facing the exact same situation!<br>\nhave you already resolved the problem?<br>\nif so, please share your solution.</p>",
      "rawMarkdown": "I am also facing the exact same situation!\nhave you already resolved the problem?\nif so, please share your solution.",
      "votes": null
    },
    {
      "id": "3006248",
      "postDate": "10/03/2024 23:15:52",
      "content": "<p>This may not be a helpful comment but, instead of finding the error, I had refractored the code for the same logic. And it turns out to work.</p>",
      "rawMarkdown": "This may not be a helpful comment but, instead of finding the error, I had refractored the code for the same logic. And it turns out to work.",
      "votes": null
    },
    {
      "id": "3006277",
      "postDate": "10/04/2024 01:41:58",
      "content": "<p>thanks for sharing your solution!<br>\nso, do you remember specifically which code you refactored ?</p>",
      "rawMarkdown": "thanks for sharing your solution!\nso, do you remember specifically which code you refactored ?",
      "votes": null
    },
    {
      "id": "3006370",
      "postDate": "10/04/2024 05:01:56",
      "content": "<p>The entire pipeline was coded as a single class with functional methods in it, but after refactoring I've changed them as several functions. </p>",
      "rawMarkdown": "The entire pipeline was coded as a single class with functional methods in it, but after refactoring I've changed them as several functions.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 2956940,
      "author_name": "nurasssyl",
      "author_url": "",
      "post_date": "08/12/2024 16:35:21",
      "content": "<p>hi, try these steps: optimize your code to stay within Kaggle’s limits, ensure all libraries are compatible, verify file paths, and simplify any asynchronous or multithreaded operations. If the issue persists, try transferring your code to a new notebook</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 2957007,
      "author_name": "rohitchaudhari25",
      "author_url": "",
      "post_date": "08/12/2024 18:03:32",
      "content": "<p>check if you are getting nans as output.<br>\nyou should do submission.fillna(0.33) to address cases where your model may output NaN calues.<br>\nif you are using dictionaries ,make sure there are no KeyErrors.</p>\n<p>I have created a tiny debug dataset for this competition which can be used as drop in replacement of original competition dataset to validate against edge cases like more or less than 3-folders per study id etc.<br>\nyou can read more in related discussion.</p>\n<p><strong>Dataset Link</strong> : <a href=\"https://www.kaggle.com/datasets/rohitchaudhari25/rsna-lsdc-2024-submission-debug-dataset\" target=\"_blank\">RSNA_LSDC_2024_submission_debug_dataset</a><br>\n<strong>Notebook Link</strong>: <a href=\"https://www.kaggle.com/code/rohitchaudhari25/rsna-lsdc-2024-submission-debug/notebook\" target=\"_blank\">RSNA_LSDC_2024_submission_debug</a></p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 3005795,
      "author_name": "kaggleutata",
      "author_url": "",
      "post_date": "10/03/2024 10:53:44",
      "content": "<p>I am also facing the exact same situation!<br>\nhave you already resolved the problem?<br>\nif so, please share your solution.</p>",
      "votes": null,
      "replies": [
        {
          "id": 3006248,
          "author_name": "wheresmadog",
          "author_url": "",
          "post_date": "10/03/2024 23:15:52",
          "content": "<p>This may not be a helpful comment but, instead of finding the error, I had refractored the code for the same logic. And it turns out to work.</p>",
          "votes": null,
          "replies": [
            {
              "id": 3006277,
              "author_name": "kaggleutata",
              "author_url": "",
              "post_date": "10/04/2024 01:41:58",
              "content": "<p>thanks for sharing your solution!<br>\nso, do you remember specifically which code you refactored ?</p>",
              "votes": null,
              "replies": [
                {
                  "id": 3006370,
                  "author_name": "wheresmadog",
                  "author_url": "",
                  "post_date": "10/04/2024 05:01:56",
                  "content": "<p>The entire pipeline was coded as a single class with functional methods in it, but after refactoring I've changed them as several functions. </p>",
                  "votes": null,
                  "replies": []
                }
              ]
            }
          ]
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "2956894": "My submission notebook keeps failing for submission.\n\nSo far, I've made sure a few things:\n- The exception in failing shows that \"Notebook Threw Exception\", hence it must outcome even before writing a `submission.csv` file and the format is not a problem (yet).\n- Apart from submission, notebook committing works fine without error.\n- Instead of using `test_series_descriptions.csv`, I tested with `train_series_descriptions.csv` to find out a problem with my code and there's no error caused.\n- Profiled memory usage in case of leakage which leads to OOM with PyTorch's profiler, which turns out not.\n- `FileNotFoundError` should not be the case as I'm using `rglob` to read DICOM files.\n\nI can't think of any other potential causes. Any recommendations please?",
    "2956940": "hi, try these steps: optimize your code to stay within Kaggle’s limits, ensure all libraries are compatible, verify file paths, and simplify any asynchronous or multithreaded operations. If the issue persists, try transferring your code to a new notebook",
    "2957007": "check if you are getting nans as output.\nyou should do submission.fillna(0.33) to address cases where your model may output NaN calues.\nif you are using dictionaries ,make sure there are no KeyErrors.\n\n\nI have created a tiny debug dataset for this competition which can be used as drop in replacement of original competition dataset to validate against edge cases like more or less than 3-folders per study id etc.\nyou can read more in related discussion.\n\n**Dataset Link** : [RSNA_LSDC_2024_submission_debug_dataset](https://www.kaggle.com/datasets/rohitchaudhari25/rsna-lsdc-2024-submission-debug-dataset)\n**Notebook Link**: [RSNA_LSDC_2024_submission_debug](https://www.kaggle.com/code/rohitchaudhari25/rsna-lsdc-2024-submission-debug/notebook)",
    "3005795": "I am also facing the exact same situation!\nhave you already resolved the problem?\nif so, please share your solution.",
    "3006248": "This may not be a helpful comment but, instead of finding the error, I had refractored the code for the same logic. And it turns out to work.",
    "3006277": "thanks for sharing your solution!\nso, do you remember specifically which code you refactored ?",
    "3006370": "The entire pipeline was coded as a single class with functional methods in it, but after refactoring I've changed them as several functions."
  },
  "source": "meta"
}