{
  "id": 394236,
  "title": "\"Notebook threw exception\"",
  "url": "/competitions/predict-student-performance-from-game-play/discussion/394236",
  "author_name": "Steven Van Ingelgem",
  "post_date": "2023-03-12T17:48:06.178000",
  "votes": 1,
  "comment_count": 13,
  "views": 0,
  "content": "<p>Hi,</p>\n<p>My submission got a \"notebook threw exception\".<br>\nBut the <a href=\"https://www.kaggle.com/code/svaningelgem/notebook5432d95b71\" target=\"_blank\">notebook</a> did not show any error.</p>\n<p>Also the submission looks correct to me.</p>\n<p>So I'm wondering why it doesn't work. And hope that someone can tell me what I've done wrong.</p>\n<p>Thanks</p>",
  "messages": [
    {
      "id": 2179255,
      "postDate": "2023-03-13T04:08:10.550Z",
      "content": "<p>I had the same problem. Even a simplest notebook (below) failed due to Notebook threw exception. </p>\n<pre><code> jo_wilder\n\nenv = jo_wilder.make_env()\njo_wilder.make_env.__called__ = \n(env)._state = ((env)._state).__dict__[]\niter_test = env.iter_test()\n\n (sample_submission, test)  iter_test:\n    env.predict(sample_submission)\n\n pandas  pd\npd.read_csv()\n</code></pre>",
      "rawMarkdown": "I had the same problem. Even a simplest notebook (below) failed due to Notebook threw exception. \n\n```python\nimport jo_wilder\n\nenv = jo_wilder.make_env()\njo_wilder.make_env.__called__ = False\ntype(env)._state = type(type(env)._state).__dict__['INIT']\niter_test = env.iter_test()\n\nfor (sample_submission, test) in iter_test:\n    env.predict(sample_submission)\n\nimport pandas as pd\npd.read_csv('submission.csv')\n\n\n```",
      "votes": 1,
      "replies": [
        {
          "id": 2179292,
          "postDate": "2023-03-13T04:22:19.310Z",
          "content": "<p>Thanks for the reply (and the code snippet -- very informative).<br>\nHow did you solve it?</p>",
          "rawMarkdown": "Thanks for the reply (and the code snippet -- very informative).\nHow did you solve it?",
          "replies": [
            {
              "id": 2179311,
              "postDate": "2023-03-13T04:34:31.397Z",
              "content": "<p>Thank you for your comment. Unfortunately, I have not been able to resolve the issue yet. I ran out of today's submission. So I will continue the experiment tomorrow.</p>",
              "rawMarkdown": "Thank you for your comment. Unfortunately, I have not been able to resolve the issue yet. I ran out of today's submission. So I will continue the experiment tomorrow."
            },
            {
              "id": 2179345,
              "postDate": "2023-03-13T04:56:25.213Z",
              "content": "<p>I have updated my <a href=\"https://www.kaggle.com/code/svaningelgem/local-timeseriesapi-emulator\" target=\"_blank\">Local TimeSeriesAPI emulator</a> with this new information.</p>\n<p>Please do let me know what you find out! I'm interested what could cause this issue.</p>",
              "rawMarkdown": "I have updated my [Local TimeSeriesAPI emulator](https://www.kaggle.com/code/svaningelgem/local-timeseriesapi-emulator) with this new information.\n\nPlease do let me know what you find out! I'm interested what could cause this issue."
            },
            {
              "id": 2183147,
              "postDate": "2023-03-15T13:45:14.817Z",
              "content": "<pre><code> jo_wilder\n\nenv = jo_wilder.make_env()\niter_test = env.iter_test()\n\n (sample_submission, test)  iter_test:\n    sample_submission[] = \n    env.predict(sample_submission)\n\n pandas  pd\ndat = pd.read_csv()\n(dat)\n</code></pre>\n<p>I added the code to fill all answer int(0) and it works. I expect some of \"correct\" column in sample_submission is broken.</p>",
              "rawMarkdown": "```python\nimport jo_wilder\n\nenv = jo_wilder.make_env()\niter_test = env.iter_test()\n\nfor (sample_submission, test) in iter_test:\n    sample_submission[\"correct\"] = 0\n    env.predict(sample_submission)\n\nimport pandas as pd\ndat = pd.read_csv('submission.csv')\nprint(dat)\n\n```\n\nI added the code to fill all answer int(0) and it works. I expect some of \"correct\" column in sample_submission is broken.",
              "votes": 1
            },
            {
              "id": 2183306,
              "postDate": "2023-03-15T15:21:22.417Z",
              "content": "<p>Thanks, I'll try that as well.</p>",
              "rawMarkdown": "Thanks, I'll try that as well."
            }
          ]
        }
      ]
    },
    {
      "id": 2178778,
      "postDate": "2023-03-12T17:48:06.180Z",
      "content": "<p>Hi,</p>\n<p>My submission got a \"notebook threw exception\".<br>\nBut the <a href=\"https://www.kaggle.com/code/svaningelgem/notebook5432d95b71\" target=\"_blank\">notebook</a> did not show any error.</p>\n<p>Also the submission looks correct to me.</p>\n<p>So I'm wondering why it doesn't work. And hope that someone can tell me what I've done wrong.</p>\n<p>Thanks</p>",
      "rawMarkdown": "Hi,\n\nMy submission got a \"notebook threw exception\".\nBut the [notebook](https://www.kaggle.com/code/svaningelgem/notebook5432d95b71) did not show any error.\n\nAlso the submission looks correct to me.\n\nSo I'm wondering why it doesn't work. And hope that someone can tell me what I've done wrong.\n\nThanks",
      "votes": 1
    },
    {
      "id": 2186689,
      "postDate": "2023-03-18T02:52:54.217Z",
      "content": "<p>Hi <a href=\"https://www.kaggle.com/svaningelgem\" target=\"_blank\">@svaningelgem</a>, how long does your scoring run before failing ?  can it be a memory issue ? the actual scoring has a lot more iterations than the mock submission. </p>",
      "rawMarkdown": "Hi @svaningelgem, how long does your scoring run before failing ?  can it be a memory issue ? the actual scoring has a lot more iterations than the mock submission. ",
      "replies": [
        {
          "id": 2186699,
          "postDate": "2023-03-18T03:10:56.753Z",
          "content": "<p>Yeah, I don't know yet. I'm running a lot of tests. My last one shows some promise (runs for 10m before failing).<br>\nWell, I got a score, but it's an \"unknown error\" while trying to do a label encoding. And it's not a KeyError… So I'm a bit of a loss what kind of error can be thrown there.</p>\n<p>I'll get there. Someday. Soon. I hope. 😁</p>",
          "rawMarkdown": "Yeah, I don't know yet. I'm running a lot of tests. My last one shows some promise (runs for 10m before failing).\nWell, I got a score, but it's an \"unknown error\" while trying to do a label encoding. And it's not a KeyError... So I'm a bit of a loss what kind of error can be thrown there.\n\nI'll get there. Someday. Soon. I hope. 😁"
        }
      ]
    },
    {
      "id": 2185278,
      "postDate": "2023-03-16T23:17:16.873Z",
      "content": "<p>I'm having the same issue. The notebook ran successfully, and the inference part is identical to many of the public baseline notebooks. Still I got the \"Notebook threw exception\" error. Also checked the log of failed notebook, unfortunately the information is not very helpful. There were some warnings, the same warnings as some public notebooks, but those did not trigger the exception.</p>",
      "rawMarkdown": "I'm having the same issue. The notebook ran successfully, and the inference part is identical to many of the public baseline notebooks. Still I got the \"Notebook threw exception\" error. Also checked the log of failed notebook, unfortunately the information is not very helpful. There were some warnings, the same warnings as some public notebooks, but those did not trigger the exception.",
      "replies": [
        {
          "id": 2272512,
          "postDate": "2023-05-24T14:46:42.670Z",
          "content": "<p>did you find out what was throwing the exception?</p>",
          "rawMarkdown": "did you find out what was throwing the exception?"
        }
      ]
    },
    {
      "id": 2179863,
      "postDate": "2023-03-13T13:06:00.203Z",
      "content": "<p>As you mentioned yourself, the notebook is OK but the submission gave error. That means that there must be an error when predicting on the hidden data set. Did you check <a href=\"https://www.kaggle.com/code-competition-debugging\" target=\"_blank\">this page</a> ? <br>\nI had such problems in other similar competitions when I did not handle a situation (error) which did not appear in the training/ test but was present in the hidden dataset on which Public Score was parsed.</p>",
      "rawMarkdown": "As you mentioned yourself, the notebook is OK but the submission gave error. That means that there must be an error when predicting on the hidden data set. Did you check [this page](https://www.kaggle.com/code-competition-debugging) ? \nI had such problems in other similar competitions when I did not handle a situation (error) which did not appear in the training/ test but was present in the hidden dataset on which Public Score was parsed.",
      "replies": [
        {
          "id": 2186530,
          "postDate": "2023-03-17T21:11:55.727Z",
          "content": "<p>Thanks, it helped me solve the submit problem!</p>",
          "rawMarkdown": "Thanks, it helped me solve the submit problem!",
          "replies": [
            {
              "id": 2188759,
              "postDate": "2023-03-20T00:53:04.863Z",
              "rawMarkdown": "",
              "isDeleted": true
            }
          ]
        }
      ]
    }
  ],
  "comments": [
    {
      "id": 2179255,
      "author_name": "qhapaq49",
      "author_url": "",
      "post_date": "2023-03-13T04:08:10.550000",
      "content": "<p>I had the same problem. Even a simplest notebook (below) failed due to Notebook threw exception. </p>\n<pre><code> jo_wilder\n\nenv = jo_wilder.make_env()\njo_wilder.make_env.__called__ = \n(env)._state = ((env)._state).__dict__[]\niter_test = env.iter_test()\n\n (sample_submission, test)  iter_test:\n    env.predict(sample_submission)\n\n pandas  pd\npd.read_csv()\n</code></pre>",
      "votes": 1,
      "replies": [
        {
          "id": 2179292,
          "author_name": "Steven Van Ingelgem",
          "author_url": "",
          "post_date": "2023-03-13T04:22:19.310000",
          "content": "<p>Thanks for the reply (and the code snippet -- very informative).<br>\nHow did you solve it?</p>",
          "votes": 0,
          "replies": [
            {
              "id": 2179311,
              "author_name": "qhapaq49",
              "author_url": "",
              "post_date": "2023-03-13T04:34:31.397000",
              "content": "<p>Thank you for your comment. Unfortunately, I have not been able to resolve the issue yet. I ran out of today's submission. So I will continue the experiment tomorrow.</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 2179345,
              "author_name": "Steven Van Ingelgem",
              "author_url": "",
              "post_date": "2023-03-13T04:56:25.213000",
              "content": "<p>I have updated my <a href=\"https://www.kaggle.com/code/svaningelgem/local-timeseriesapi-emulator\" target=\"_blank\">Local TimeSeriesAPI emulator</a> with this new information.</p>\n<p>Please do let me know what you find out! I'm interested what could cause this issue.</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 2183147,
              "author_name": "qhapaq49",
              "author_url": "",
              "post_date": "2023-03-15T13:45:14.817000",
              "content": "<pre><code> jo_wilder\n\nenv = jo_wilder.make_env()\niter_test = env.iter_test()\n\n (sample_submission, test)  iter_test:\n    sample_submission[] = \n    env.predict(sample_submission)\n\n pandas  pd\ndat = pd.read_csv()\n(dat)\n</code></pre>\n<p>I added the code to fill all answer int(0) and it works. I expect some of \"correct\" column in sample_submission is broken.</p>",
              "votes": 1,
              "replies": []
            },
            {
              "id": 2183306,
              "author_name": "Steven Van Ingelgem",
              "author_url": "",
              "post_date": "2023-03-15T15:21:22.417000",
              "content": "<p>Thanks, I'll try that as well.</p>",
              "votes": 0,
              "replies": []
            }
          ]
        }
      ]
    },
    {
      "id": 2186689,
      "author_name": "Elias",
      "author_url": "",
      "post_date": "2023-03-18T02:52:54.217000",
      "content": "<p>Hi <a href=\"https://www.kaggle.com/svaningelgem\" target=\"_blank\">@svaningelgem</a>, how long does your scoring run before failing ?  can it be a memory issue ? the actual scoring has a lot more iterations than the mock submission. </p>",
      "votes": 0,
      "replies": [
        {
          "id": 2186699,
          "author_name": "Steven Van Ingelgem",
          "author_url": "",
          "post_date": "2023-03-18T03:10:56.753000",
          "content": "<p>Yeah, I don't know yet. I'm running a lot of tests. My last one shows some promise (runs for 10m before failing).<br>\nWell, I got a score, but it's an \"unknown error\" while trying to do a label encoding. And it's not a KeyError… So I'm a bit of a loss what kind of error can be thrown there.</p>\n<p>I'll get there. Someday. Soon. I hope. 😁</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 2185278,
      "author_name": "fermion",
      "author_url": "",
      "post_date": "2023-03-16T23:17:16.873000",
      "content": "<p>I'm having the same issue. The notebook ran successfully, and the inference part is identical to many of the public baseline notebooks. Still I got the \"Notebook threw exception\" error. Also checked the log of failed notebook, unfortunately the information is not very helpful. There were some warnings, the same warnings as some public notebooks, but those did not trigger the exception.</p>",
      "votes": 0,
      "replies": [
        {
          "id": 2272512,
          "author_name": "acarf",
          "author_url": "",
          "post_date": "2023-05-24T14:46:42.670000",
          "content": "<p>did you find out what was throwing the exception?</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 2179863,
      "author_name": "Catadanna",
      "author_url": "",
      "post_date": "2023-03-13T13:06:00.203000",
      "content": "<p>As you mentioned yourself, the notebook is OK but the submission gave error. That means that there must be an error when predicting on the hidden data set. Did you check <a href=\"https://www.kaggle.com/code-competition-debugging\" target=\"_blank\">this page</a> ? <br>\nI had such problems in other similar competitions when I did not handle a situation (error) which did not appear in the training/ test but was present in the hidden dataset on which Public Score was parsed.</p>",
      "votes": 0,
      "replies": [
        {
          "id": 2186530,
          "author_name": "Sam",
          "author_url": "",
          "post_date": "2023-03-17T21:11:55.727000",
          "content": "<p>Thanks, it helped me solve the submit problem!</p>",
          "votes": 0,
          "replies": [
            {
              "id": 2188759,
              "author_name": "",
              "author_url": "",
              "post_date": "2023-03-20T00:53:04.863000",
              "content": "",
              "votes": 0,
              "replies": []
            }
          ]
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "2179255": "I had the same problem. Even a simplest notebook (below) failed due to Notebook threw exception. \n\n```python\nimport jo_wilder\n\nenv = jo_wilder.make_env()\njo_wilder.make_env.__called__ = False\ntype(env)._state = type(type(env)._state).__dict__['INIT']\niter_test = env.iter_test()\n\nfor (sample_submission, test) in iter_test:\n    env.predict(sample_submission)\n\nimport pandas as pd\npd.read_csv('submission.csv')\n\n\n```",
    "2178778": "Hi,\n\nMy submission got a \"notebook threw exception\".\nBut the [notebook](https://www.kaggle.com/code/svaningelgem/notebook5432d95b71) did not show any error.\n\nAlso the submission looks correct to me.\n\nSo I'm wondering why it doesn't work. And hope that someone can tell me what I've done wrong.\n\nThanks",
    "2186689": "Hi @svaningelgem, how long does your scoring run before failing ?  can it be a memory issue ? the actual scoring has a lot more iterations than the mock submission. ",
    "2185278": "I'm having the same issue. The notebook ran successfully, and the inference part is identical to many of the public baseline notebooks. Still I got the \"Notebook threw exception\" error. Also checked the log of failed notebook, unfortunately the information is not very helpful. There were some warnings, the same warnings as some public notebooks, but those did not trigger the exception.",
    "2179863": "As you mentioned yourself, the notebook is OK but the submission gave error. That means that there must be an error when predicting on the hidden data set. Did you check [this page](https://www.kaggle.com/code-competition-debugging) ? \nI had such problems in other similar competitions when I did not handle a situation (error) which did not appear in the training/ test but was present in the hidden dataset on which Public Score was parsed."
  }
}