{
  "id": 402248,
  "title": "What could be the issue with the code causing \"Notebook Threw Exception.\" during submission?",
  "url": "/competitions/predict-student-performance-from-game-play/discussion/402248",
  "author_name": "",
  "post_date": "2023-04-17T15:34:25.080075Z",
  "votes": 3,
  "comment_count": 6,
  "views": 0,
  "content": "<p>Please tell me about the issues with the code.<br>\nThe following is a function for mapping predicted values to a submission file.</p>\n<p><a href=\"https://www.kaggle.com/code/kazumasatokaggle/error-code-predict-student-performance\" target=\"_blank\">https://www.kaggle.com/code/kazumasatokaggle/error-code-predict-student-performance</a><br>\n→above code of this page.</p>\n<p>The following code preprocesses the test data as test_agg, uses the pre-trained models to obtain predicted values, and maps them to sample_submission. The models are created for each level_group, and the code branches which model to use depending on which level_group the test data belongs to.</p>\n<p>Note that the code assumes the possibility of different level_groups being included in one iteration of the test data. To account for this, the sample_submission data is first divided into 0_4, 5_12, and 13_22 groups, and then concatenated at the end.</p>\n<p><a href=\"https://www.kaggle.com/code/kazumasatokaggle/error-code-predict-student-performance\" target=\"_blank\">https://www.kaggle.com/code/kazumasatokaggle/error-code-predict-student-performance</a><br>\n→below code of this page.</p>\n<p>The notebook is submitted successfully, but the score display page shows \"Notebook Threw Exception.\" What could be the possible issue? Thank you for reading.</p>",
  "messages": [
    {
      "id": "2224719",
      "postDate": "04/17/2023 15:34:25",
      "content": "<p>Please tell me about the issues with the code.<br>\nThe following is a function for mapping predicted values to a submission file.</p>\n<p><a href=\"https://www.kaggle.com/code/kazumasatokaggle/error-code-predict-student-performance\" target=\"_blank\">https://www.kaggle.com/code/kazumasatokaggle/error-code-predict-student-performance</a><br>\n→above code of this page.</p>\n<p>The following code preprocesses the test data as test_agg, uses the pre-trained models to obtain predicted values, and maps them to sample_submission. The models are created for each level_group, and the code branches which model to use depending on which level_group the test data belongs to.</p>\n<p>Note that the code assumes the possibility of different level_groups being included in one iteration of the test data. To account for this, the sample_submission data is first divided into 0_4, 5_12, and 13_22 groups, and then concatenated at the end.</p>\n<p><a href=\"https://www.kaggle.com/code/kazumasatokaggle/error-code-predict-student-performance\" target=\"_blank\">https://www.kaggle.com/code/kazumasatokaggle/error-code-predict-student-performance</a><br>\n→below code of this page.</p>\n<p>The notebook is submitted successfully, but the score display page shows \"Notebook Threw Exception.\" What could be the possible issue? Thank you for reading.</p>",
      "rawMarkdown": "Please tell me about the issues with the code.\nThe following is a function for mapping predicted values to a submission file.\n\nhttps://www.kaggle.com/code/kazumasatokaggle/error-code-predict-student-performance\n→above code of this page.\n\nThe following code preprocesses the test data as test_agg, uses the pre-trained models to obtain predicted values, and maps them to sample_submission. The models are created for each level_group, and the code branches which model to use depending on which level_group the test data belongs to.\n\nNote that the code assumes the possibility of different level_groups being included in one iteration of the test data. To account for this, the sample_submission data is first divided into 0_4, 5_12, and 13_22 groups, and then concatenated at the end.\n\nhttps://www.kaggle.com/code/kazumasatokaggle/error-code-predict-student-performance\n→below code of this page.\n\nThe notebook is submitted successfully, but the score display page shows \"Notebook Threw Exception.\" What could be the possible issue? Thank you for reading.",
      "votes": null
    },
    {
      "id": "2224817",
      "postDate": "04/17/2023 17:09:57",
      "content": "<p>Having the same problem here. Already tried lots of things over the last week and nothing seems to work. Its hard to debug something that only throws hidden exceptions, is like blind painting.</p>",
      "rawMarkdown": "Having the same problem here. Already tried lots of things over the last week and nothing seems to work. Its hard to debug something that only throws hidden exceptions, is like blind painting.",
      "votes": null
    },
    {
      "id": "2225453",
      "postDate": "04/18/2023 07:21:49",
      "content": "<p>I used to have this problem. I figured out it was because, during feature engineering of the scoring stage, the hidden test dataset generated some feature that was not included in my pre-trained model. It would work ok with submit, since during submit stage only very few test sets (like 50) were provided and none of them generated the problematic feature.</p>",
      "rawMarkdown": "I used to have this problem. I figured out it was because, during feature engineering of the scoring stage, the hidden test dataset generated some feature that was not included in my pre-trained model. It would work ok with submit, since during submit stage only very few test sets (like 50) were provided and none of them generated the problematic feature.",
      "votes": null
    },
    {
      "id": "2225495",
      "postDate": "04/18/2023 07:52:15",
      "content": "<p>Thanks for the support!<br>\nI will try to verify it.</p>",
      "rawMarkdown": "Thanks for the support!\nI will try to verify it.",
      "votes": null
    },
    {
      "id": "2225496",
      "postDate": "04/18/2023 07:52:50",
      "content": "<p>Thank you very much.<br>\nIt's a lot of work. I will continue to work toward resolving the issue.</p>",
      "rawMarkdown": "Thank you very much.\nIt's a lot of work. I will continue to work toward resolving the issue.",
      "votes": null
    },
    {
      "id": "2230968",
      "postDate": "04/23/2023 00:36:11",
      "content": "<p>Did you happen to find any features that were different? I'm having the same issue, getting an exception error and I don't know what else I can do to fix this.</p>",
      "rawMarkdown": "Did you happen to find any features that were different? I'm having the same issue, getting an exception error and I don't know what else I can do to fix this.",
      "votes": null
    },
    {
      "id": "2259570",
      "postDate": "05/15/2023 05:14:58",
      "content": "<p>This could happen because of some assumptions that are being made about the private data which do not hold for the public data. </p>",
      "rawMarkdown": "This could happen because of some assumptions that are being made about the private data which do not hold for the public data.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 2224817,
      "author_name": "eleuuterio",
      "author_url": "",
      "post_date": "04/17/2023 17:09:57",
      "content": "<p>Having the same problem here. Already tried lots of things over the last week and nothing seems to work. Its hard to debug something that only throws hidden exceptions, is like blind painting.</p>",
      "votes": null,
      "replies": [
        {
          "id": 2225496,
          "author_name": "kazumasatokaggle",
          "author_url": "",
          "post_date": "04/18/2023 07:52:50",
          "content": "<p>Thank you very much.<br>\nIt's a lot of work. I will continue to work toward resolving the issue.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 2225453,
      "author_name": "ataraxian",
      "author_url": "",
      "post_date": "04/18/2023 07:21:49",
      "content": "<p>I used to have this problem. I figured out it was because, during feature engineering of the scoring stage, the hidden test dataset generated some feature that was not included in my pre-trained model. It would work ok with submit, since during submit stage only very few test sets (like 50) were provided and none of them generated the problematic feature.</p>",
      "votes": null,
      "replies": [
        {
          "id": 2225495,
          "author_name": "kazumasatokaggle",
          "author_url": "",
          "post_date": "04/18/2023 07:52:15",
          "content": "<p>Thanks for the support!<br>\nI will try to verify it.</p>",
          "votes": null,
          "replies": [
            {
              "id": 2230968,
              "author_name": "joseviteri",
              "author_url": "",
              "post_date": "04/23/2023 00:36:11",
              "content": "<p>Did you happen to find any features that were different? I'm having the same issue, getting an exception error and I don't know what else I can do to fix this.</p>",
              "votes": null,
              "replies": []
            }
          ]
        }
      ]
    },
    {
      "id": 2259570,
      "author_name": "yus002",
      "author_url": "",
      "post_date": "05/15/2023 05:14:58",
      "content": "<p>This could happen because of some assumptions that are being made about the private data which do not hold for the public data. </p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "2224719": "Please tell me about the issues with the code.\nThe following is a function for mapping predicted values to a submission file.\n\nhttps://www.kaggle.com/code/kazumasatokaggle/error-code-predict-student-performance\n→above code of this page.\n\nThe following code preprocesses the test data as test_agg, uses the pre-trained models to obtain predicted values, and maps them to sample_submission. The models are created for each level_group, and the code branches which model to use depending on which level_group the test data belongs to.\n\nNote that the code assumes the possibility of different level_groups being included in one iteration of the test data. To account for this, the sample_submission data is first divided into 0_4, 5_12, and 13_22 groups, and then concatenated at the end.\n\nhttps://www.kaggle.com/code/kazumasatokaggle/error-code-predict-student-performance\n→below code of this page.\n\nThe notebook is submitted successfully, but the score display page shows \"Notebook Threw Exception.\" What could be the possible issue? Thank you for reading.",
    "2224817": "Having the same problem here. Already tried lots of things over the last week and nothing seems to work. Its hard to debug something that only throws hidden exceptions, is like blind painting.",
    "2225453": "I used to have this problem. I figured out it was because, during feature engineering of the scoring stage, the hidden test dataset generated some feature that was not included in my pre-trained model. It would work ok with submit, since during submit stage only very few test sets (like 50) were provided and none of them generated the problematic feature.",
    "2225495": "Thanks for the support!\nI will try to verify it.",
    "2225496": "Thank you very much.\nIt's a lot of work. I will continue to work toward resolving the issue.",
    "2230968": "Did you happen to find any features that were different? I'm having the same issue, getting an exception error and I don't know what else I can do to fix this.",
    "2259570": "This could happen because of some assumptions that are being made about the private data which do not hold for the public data."
  },
  "source": "meta"
}