{
  "id": 396348,
  "title": "Submission ERROR: Notebook Threw Exception",
  "url": "/competitions/predict-student-performance-from-game-play/discussion/396348",
  "author_name": "HZM",
  "post_date": "2023-03-21T08:33:39.413000",
  "votes": 10,
  "comment_count": 5,
  "views": 0,
  "content": "<p>when  I used the new JO api to submit my notebook, it can bug free run, but once I submited it, I got Notebook Threw Exception, the following is my code, did you have the same issue?</p>\n<p>**** code ****</p>\n<pre><code>limits = {'0-4':(1,4), '5-12':(4,14), '13-22':(14,19)}\ncount = 0\nfor (test,sample_submission) in iter_test:\n    grps = ['0-4', '5-12', '13-22']\n    total_test = []\n    for grp in grps:\n        a,b = limits[grp]\n        sub_test = test[test['level_group']==grp]\n        session_ids = sub_test.session_id.unique()\n        # ------------------- level 0-4 ---------------------------------\n        if a == 1:\n            FEATURES = FEATURES1\n            sub_test = (pl.from_pandas(sub_test)\n                  .drop([\"fullscreen\", \"hq\", \"music\"])\n                  .with_columns(columns))\n            sub_test = feature_engineer_pl(sub_test, grp, use_extra=True, feature_suffix='')\n            sub_test = sub_test[FEATURES]\n        # ------------------- level 5-12 ---------------------------------\n        elif a == 4:\n            FEATURES = FEATURES2\n            sub_test = (pl.from_pandas(sub_test)\n                  .drop([\"fullscreen\", \"hq\", \"music\"])\n                  .with_columns(columns))\n            sub_test = feature_engineer_pl(sub_test, grp, use_extra=True, feature_suffix='')\n            sub_test = sub_test[FEATURES]\n        # ------------------- level 13-22 ---------------------------------    \n        elif a == 14:\n            FEATURES = FEATURES3\n            sub_test = (pl.from_pandas(sub_test)\n                  .drop([\"fullscreen\", \"hq\", \"music\"])\n                  .with_columns(columns))\n            sub_test = feature_engineer_pl(sub_test, grp, use_extra=True, feature_suffix='')\n            sub_test = sub_test[FEATURES]\n        for t in range(a,b):\n            clf = xgb_dict[t]\n            mask = sample_submission.session_id.apply(lambda x:x.split('_')[1]).isin([f'q{t}']) &amp; sample_submission.session_id.apply(lambda x:int(x.split('_')[0])).isin(session_ids)\n            p = clf.predict_proba(sub_test.astype('float32'))[:,1] \n            sample_submission.loc[mask,'correct'] = np.where(p&gt;0.625,1,0) \n    env.predict(sample_submission)\n</code></pre>",
  "messages": [
    {
      "id": 2190438,
      "postDate": "2023-03-21T08:33:39.413Z",
      "content": "<p>when  I used the new JO api to submit my notebook, it can bug free run, but once I submited it, I got Notebook Threw Exception, the following is my code, did you have the same issue?</p>\n<p>**** code ****</p>\n<pre><code>limits = {'0-4':(1,4), '5-12':(4,14), '13-22':(14,19)}\ncount = 0\nfor (test,sample_submission) in iter_test:\n    grps = ['0-4', '5-12', '13-22']\n    total_test = []\n    for grp in grps:\n        a,b = limits[grp]\n        sub_test = test[test['level_group']==grp]\n        session_ids = sub_test.session_id.unique()\n        # ------------------- level 0-4 ---------------------------------\n        if a == 1:\n            FEATURES = FEATURES1\n            sub_test = (pl.from_pandas(sub_test)\n                  .drop([\"fullscreen\", \"hq\", \"music\"])\n                  .with_columns(columns))\n            sub_test = feature_engineer_pl(sub_test, grp, use_extra=True, feature_suffix='')\n            sub_test = sub_test[FEATURES]\n        # ------------------- level 5-12 ---------------------------------\n        elif a == 4:\n            FEATURES = FEATURES2\n            sub_test = (pl.from_pandas(sub_test)\n                  .drop([\"fullscreen\", \"hq\", \"music\"])\n                  .with_columns(columns))\n            sub_test = feature_engineer_pl(sub_test, grp, use_extra=True, feature_suffix='')\n            sub_test = sub_test[FEATURES]\n        # ------------------- level 13-22 ---------------------------------    \n        elif a == 14:\n            FEATURES = FEATURES3\n            sub_test = (pl.from_pandas(sub_test)\n                  .drop([\"fullscreen\", \"hq\", \"music\"])\n                  .with_columns(columns))\n            sub_test = feature_engineer_pl(sub_test, grp, use_extra=True, feature_suffix='')\n            sub_test = sub_test[FEATURES]\n        for t in range(a,b):\n            clf = xgb_dict[t]\n            mask = sample_submission.session_id.apply(lambda x:x.split('_')[1]).isin([f'q{t}']) &amp; sample_submission.session_id.apply(lambda x:int(x.split('_')[0])).isin(session_ids)\n            p = clf.predict_proba(sub_test.astype('float32'))[:,1] \n            sample_submission.loc[mask,'correct'] = np.where(p&gt;0.625,1,0) \n    env.predict(sample_submission)\n</code></pre>",
      "rawMarkdown": "when  I used the new JO api to submit my notebook, it can bug free run, but once I submited it, I got Notebook Threw Exception, the following is my code, did you have the same issue?\n\n**** code ****\n\n````\nlimits = {'0-4':(1,4), '5-12':(4,14), '13-22':(14,19)}\ncount = 0\nfor (test,sample_submission) in iter_test:\n    grps = ['0-4', '5-12', '13-22']\n    total_test = []\n    for grp in grps:\n        a,b = limits[grp]\n        sub_test = test[test['level_group']==grp]\n        session_ids = sub_test.session_id.unique()\n        # ------------------- level 0-4 ---------------------------------\n        if a == 1:\n            FEATURES = FEATURES1\n            sub_test = (pl.from_pandas(sub_test)\n                  .drop([\"fullscreen\", \"hq\", \"music\"])\n                  .with_columns(columns))\n            sub_test = feature_engineer_pl(sub_test, grp, use_extra=True, feature_suffix='')\n            sub_test = sub_test[FEATURES]\n        # ------------------- level 5-12 ---------------------------------\n        elif a == 4:\n            FEATURES = FEATURES2\n            sub_test = (pl.from_pandas(sub_test)\n                  .drop([\"fullscreen\", \"hq\", \"music\"])\n                  .with_columns(columns))\n            sub_test = feature_engineer_pl(sub_test, grp, use_extra=True, feature_suffix='')\n            sub_test = sub_test[FEATURES]\n        # ------------------- level 13-22 ---------------------------------    \n        elif a == 14:\n            FEATURES = FEATURES3\n            sub_test = (pl.from_pandas(sub_test)\n                  .drop([\"fullscreen\", \"hq\", \"music\"])\n                  .with_columns(columns))\n            sub_test = feature_engineer_pl(sub_test, grp, use_extra=True, feature_suffix='')\n            sub_test = sub_test[FEATURES]\n        for t in range(a,b):\n            clf = xgb_dict[t]\n            mask = sample_submission.session_id.apply(lambda x:x.split('_')[1]).isin([f'q{t}']) & sample_submission.session_id.apply(lambda x:int(x.split('_')[0])).isin(session_ids)\n            p = clf.predict_proba(sub_test.astype('float32'))[:,1] \n            sample_submission.loc[mask,'correct'] = np.where(p>0.625,1,0) \n    env.predict(sample_submission)\n\n````\n",
      "votes": 10
    },
    {
      "id": 2190453,
      "postDate": "2023-03-21T08:45:02.457Z",
      "content": "<p>Same here , maybe lot of bugs were introduced in the last update </p>",
      "rawMarkdown": "Same here , maybe lot of bugs were introduced in the last update ",
      "votes": 1
    },
    {
      "id": 2190863,
      "postDate": "2023-03-21T14:37:06.410Z",
      "content": "<p><a href=\"https://www.kaggle.com/leehann\" target=\"_blank\">@leehann</a>, the Kaggle team have been quiet for hours. I would rather wait until they answer all the questions raised <a href=\"https://www.kaggle.com/competitions/predict-student-performance-from-game-play/discussion/396202#2190090\" target=\"_blank\">here</a> before making any more submission.</p>",
      "rawMarkdown": "@leehann, the Kaggle team have been quiet for hours. I would rather wait until they answer all the questions raised [here](https://www.kaggle.com/competitions/predict-student-performance-from-game-play/discussion/396202#2190090) before making any more submission."
    },
    {
      "id": 2190517,
      "postDate": "2023-03-21T09:42:09.050Z",
      "content": "<p>can Kaggle staff, help us ?</p>",
      "rawMarkdown": "can Kaggle staff, help us ?"
    },
    {
      "id": 2190507,
      "postDate": "2023-03-21T09:23:38.277Z",
      "content": "<p>Same issue here, already submit three notebooks but all fail! </p>",
      "rawMarkdown": "Same issue here, already submit three notebooks but all fail! "
    },
    {
      "id": 2190542,
      "postDate": "2023-03-21T10:30:21.050Z",
      "rawMarkdown": "",
      "votes": 1,
      "isDeleted": true
    }
  ],
  "comments": [
    {
      "id": 2190453,
      "author_name": "Reacher",
      "author_url": "",
      "post_date": "2023-03-21T08:45:02.457000",
      "content": "<p>Same here , maybe lot of bugs were introduced in the last update </p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 2190863,
      "author_name": "YaGana Sheriff-Hussaini",
      "author_url": "",
      "post_date": "2023-03-21T14:37:06.410000",
      "content": "<p><a href=\"https://www.kaggle.com/leehann\" target=\"_blank\">@leehann</a>, the Kaggle team have been quiet for hours. I would rather wait until they answer all the questions raised <a href=\"https://www.kaggle.com/competitions/predict-student-performance-from-game-play/discussion/396202#2190090\" target=\"_blank\">here</a> before making any more submission.</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 2190517,
      "author_name": "HZM",
      "author_url": "",
      "post_date": "2023-03-21T09:42:09.050000",
      "content": "<p>can Kaggle staff, help us ?</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 2190507,
      "author_name": "AbaoJiang",
      "author_url": "",
      "post_date": "2023-03-21T09:23:38.277000",
      "content": "<p>Same issue here, already submit three notebooks but all fail! </p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 2190542,
      "author_name": "",
      "author_url": "",
      "post_date": "2023-03-21T10:30:21.050000",
      "content": "",
      "votes": 1,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "2190438": "when  I used the new JO api to submit my notebook, it can bug free run, but once I submited it, I got Notebook Threw Exception, the following is my code, did you have the same issue?\n\n**** code ****\n\n````\nlimits = {'0-4':(1,4), '5-12':(4,14), '13-22':(14,19)}\ncount = 0\nfor (test,sample_submission) in iter_test:\n    grps = ['0-4', '5-12', '13-22']\n    total_test = []\n    for grp in grps:\n        a,b = limits[grp]\n        sub_test = test[test['level_group']==grp]\n        session_ids = sub_test.session_id.unique()\n        # ------------------- level 0-4 ---------------------------------\n        if a == 1:\n            FEATURES = FEATURES1\n            sub_test = (pl.from_pandas(sub_test)\n                  .drop([\"fullscreen\", \"hq\", \"music\"])\n                  .with_columns(columns))\n            sub_test = feature_engineer_pl(sub_test, grp, use_extra=True, feature_suffix='')\n            sub_test = sub_test[FEATURES]\n        # ------------------- level 5-12 ---------------------------------\n        elif a == 4:\n            FEATURES = FEATURES2\n            sub_test = (pl.from_pandas(sub_test)\n                  .drop([\"fullscreen\", \"hq\", \"music\"])\n                  .with_columns(columns))\n            sub_test = feature_engineer_pl(sub_test, grp, use_extra=True, feature_suffix='')\n            sub_test = sub_test[FEATURES]\n        # ------------------- level 13-22 ---------------------------------    \n        elif a == 14:\n            FEATURES = FEATURES3\n            sub_test = (pl.from_pandas(sub_test)\n                  .drop([\"fullscreen\", \"hq\", \"music\"])\n                  .with_columns(columns))\n            sub_test = feature_engineer_pl(sub_test, grp, use_extra=True, feature_suffix='')\n            sub_test = sub_test[FEATURES]\n        for t in range(a,b):\n            clf = xgb_dict[t]\n            mask = sample_submission.session_id.apply(lambda x:x.split('_')[1]).isin([f'q{t}']) & sample_submission.session_id.apply(lambda x:int(x.split('_')[0])).isin(session_ids)\n            p = clf.predict_proba(sub_test.astype('float32'))[:,1] \n            sample_submission.loc[mask,'correct'] = np.where(p>0.625,1,0) \n    env.predict(sample_submission)\n\n````\n",
    "2190453": "Same here , maybe lot of bugs were introduced in the last update ",
    "2190863": "@leehann, the Kaggle team have been quiet for hours. I would rather wait until they answer all the questions raised [here](https://www.kaggle.com/competitions/predict-student-performance-from-game-play/discussion/396202#2190090) before making any more submission.",
    "2190517": "can Kaggle staff, help us ?",
    "2190507": "Same issue here, already submit three notebooks but all fail! ",
    "2190542": ""
  }
}