{
  "id": 405831,
  "title": "Future Warning",
  "url": "/competitions/predict-student-performance-from-game-play/discussion/405831",
  "author_name": "",
  "post_date": "2023-04-29T15:46:32.221574100Z",
  "votes": 2,
  "comment_count": 4,
  "views": 0,
  "content": "<p>Hi all, </p>\n<p>new to kaggle, I've been trying to submit my notebook for well over a week but I keep on running into an exception error. On the test dataset it works fine, no errors, the samplesubmission.csv is created as expected, when I submit it always throwback an error:</p>\n<pre><code>s     / [==============================] - ETA: 0s\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b/ [==============================] - 0s 26ms/step\ns     /opt/conda/lib/python3/site-packages/traitlets/traitlets.py:: FutureWarning: --Exporter.preprocessors=[]  containers  deprecated  traitlets . You can  `--Exporter.preprocessors item` ... multiple times to add items to a .\ns       FutureWarning,\ns     [NbConvertApp] Converting notebook __notebook__.ipynb to notebook\ns     [NbConvertApp] Writing   to __notebook__.ipynb\ns     /opt/conda/lib/python3/site-packages/traitlets/traitlets.py:: FutureWarning: --Exporter.preprocessors=[]  containers  deprecated  traitlets . You can  `--Exporter.preprocessors item` ... multiple times to add items to a .\ns       FutureWarning,\ns     [NbConvertApp] Converting notebook __notebook__.ipynb to html\ns     [NbConvertApp] Writing   to __results__.html\n</code></pre>\n<p>What does it mean? This is very difficult to debug. This is my submission loop:</p>\n<pre><code>limits = {:(,), :(,), :(,)}\n\n (test, sample_submission)  iter_test:\n\n    \n    df = concat_features(test)\n\n    \n    grp = test.level_group.values[]\n    a,b = limits[grp]\n     t  (a,b):\n        clf = MODELS[]\n        p = clf.predict(df)[][]\n        mask = sample_submission.session_id..contains()\n        sample_submission.loc[mask,] = ( p &gt;  )\n\n    env.predict(sample_submission)\n</code></pre>\n<p><a href=\"https://www.kaggle.com/philculliton\" target=\"_blank\">@philculliton</a> </p>",
  "messages": [
    {
      "id": "2239518",
      "postDate": "04/29/2023 15:46:32",
      "content": "<p>Hi all, </p>\n<p>new to kaggle, I've been trying to submit my notebook for well over a week but I keep on running into an exception error. On the test dataset it works fine, no errors, the samplesubmission.csv is created as expected, when I submit it always throwback an error:</p>\n<pre><code>s     / [==============================] - ETA: 0s\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b/ [==============================] - 0s 26ms/step\ns     /opt/conda/lib/python3/site-packages/traitlets/traitlets.py:: FutureWarning: --Exporter.preprocessors=[]  containers  deprecated  traitlets . You can  `--Exporter.preprocessors item` ... multiple times to add items to a .\ns       FutureWarning,\ns     [NbConvertApp] Converting notebook __notebook__.ipynb to notebook\ns     [NbConvertApp] Writing   to __notebook__.ipynb\ns     /opt/conda/lib/python3/site-packages/traitlets/traitlets.py:: FutureWarning: --Exporter.preprocessors=[]  containers  deprecated  traitlets . You can  `--Exporter.preprocessors item` ... multiple times to add items to a .\ns       FutureWarning,\ns     [NbConvertApp] Converting notebook __notebook__.ipynb to html\ns     [NbConvertApp] Writing   to __results__.html\n</code></pre>\n<p>What does it mean? This is very difficult to debug. This is my submission loop:</p>\n<pre><code>limits = {:(,), :(,), :(,)}\n\n (test, sample_submission)  iter_test:\n\n    \n    df = concat_features(test)\n\n    \n    grp = test.level_group.values[]\n    a,b = limits[grp]\n     t  (a,b):\n        clf = MODELS[]\n        p = clf.predict(df)[][]\n        mask = sample_submission.session_id..contains()\n        sample_submission.loc[mask,] = ( p &gt;  )\n\n    env.predict(sample_submission)\n</code></pre>\n<p><a href=\"https://www.kaggle.com/philculliton\" target=\"_blank\">@philculliton</a> </p>",
      "rawMarkdown": "Hi all, \n\nnew to kaggle, I've been trying to submit my notebook for well over a week but I keep on running into an exception error. On the test dataset it works fine, no errors, the samplesubmission.csv is created as expected, when I submit it always throwback an error:\n\n```python\n235.5s\t201\t1/1 [==============================] - ETA: 0s\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b1/1 [==============================] - 0s 26ms/step\n241.2s\t202\t/opt/conda/lib/python3.7/site-packages/traitlets/traitlets.py:2935: FutureWarning: --Exporter.preprocessors=[\"remove_papermill_header.RemovePapermillHeader\"] for containers is deprecated in traitlets 5.0. You can pass `--Exporter.preprocessors item` ... multiple times to add items to a list.\n241.2s\t203\t  FutureWarning,\n241.2s\t204\t[NbConvertApp] Converting notebook __notebook__.ipynb to notebook\n241.9s\t205\t[NbConvertApp] Writing 98100 bytes to __notebook__.ipynb\n243.6s\t206\t/opt/conda/lib/python3.7/site-packages/traitlets/traitlets.py:2935: FutureWarning: --Exporter.preprocessors=[\"nbconvert.preprocessors.ExtractOutputPreprocessor\"] for containers is deprecated in traitlets 5.0. You can pass `--Exporter.preprocessors item` ... multiple times to add items to a list.\n243.6s\t207\t  FutureWarning,\n243.6s\t208\t[NbConvertApp] Converting notebook __notebook__.ipynb to html\n244.8s\t209\t[NbConvertApp] Writing 379881 bytes to __results__.html\n```\n\nWhat does it mean? This is very difficult to debug. This is my submission loop:\n\n```python\nlimits = {'0-4':(1,4), '5-12':(4,14), '13-22':(14,19)}\n\nfor (test, sample_submission) in iter_test:\n    \n    # FEATURE ENGINEER TEST DATA\n    df = concat_features(test)\n    \n    # INFER TEST DATA\n    grp = test.level_group.values[0]\n    a,b = limits[grp]\n    for t in range(a,b):\n        clf = MODELS[f\"question {t} model\"]\n        p = clf.predict(df)[0][0]\n        mask = sample_submission.session_id.str.contains(f'q{t}')\n        sample_submission.loc[mask,'correct'] = int( p > 0.65 )\n    \n    env.predict(sample_submission)\n```\n\n@philculliton",
      "votes": null
    },
    {
      "id": "2241241",
      "postDate": "05/01/2023 10:23:14",
      "content": "<p>Hi <a href=\"https://www.kaggle.com/joseviteri\" target=\"_blank\">@joseviteri</a> , if it works on the test dataset, it may come from your concat_features function. It may run into something that didn't happen in the test dataset.  One way to test that is to simplify your concat_features to the minimum and add features until it errors again.</p>",
      "rawMarkdown": "Hi @joseviteri , if it works on the test dataset, it may come from your concat_features function. It may run into something that didn't happen in the test dataset.  One way to test that is to simplify your concat_features to the minimum and add features until it errors again.",
      "votes": null
    },
    {
      "id": "2241535",
      "postDate": "05/01/2023 15:29:13",
      "content": "<p>This is just warning. And in fact, it is too difficult to inspect the bug for the limited code you published. </p>",
      "rawMarkdown": "This is just warning. And in fact, it is too difficult to inspect the bug for the limited code you published.",
      "votes": null
    },
    {
      "id": "2241639",
      "postDate": "05/01/2023 17:07:19",
      "content": "<pre><code> ():\n    dfs = []\n    temp = df.groupby(by = [])[].() - df.groupby(by = [])[].()\n    temp = temp.rename()\n    dfs.append(temp)\n    dfs = dfs.fillna(-)\n    dfs = dfs.reset_index()\n    dfs = dfs.set_index()\n\n     dfs\n</code></pre>\n<p><a href=\"https://www.kaggle.com/littlstar123\" target=\"_blank\">@littlstar123</a> nothing special as you can see, the concat function is only looking at elapsed time.</p>",
      "rawMarkdown": "```python\ndef concat_features(df):\n    dfs = []\n    temp = df.groupby(by = [\"session_id\"])[\"elapsed_time\"].max() - df.groupby(by = [\"session_id\"])[\"elapsed_time\"].min()\n    temp = temp.rename(\"elapsed_duration\")\n    dfs.append(temp)\n    dfs = dfs.fillna(-1)\n    dfs = dfs.reset_index()\n    dfs = dfs.set_index('session_id')\n    \n    return dfs\n```\n@littlstar123 nothing special as you can see, the concat function is only looking at elapsed time.",
      "votes": null
    },
    {
      "id": "2241640",
      "postDate": "05/01/2023 17:08:02",
      "content": "<p>Thanks for the guidance! I'll try it, at the current status I'm only viewing the elapsed_time feature.</p>",
      "rawMarkdown": "Thanks for the guidance! I'll try it, at the current status I'm only viewing the elapsed_time feature.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 2241241,
      "author_name": "gehallak",
      "author_url": "",
      "post_date": "05/01/2023 10:23:14",
      "content": "<p>Hi <a href=\"https://www.kaggle.com/joseviteri\" target=\"_blank\">@joseviteri</a> , if it works on the test dataset, it may come from your concat_features function. It may run into something that didn't happen in the test dataset.  One way to test that is to simplify your concat_features to the minimum and add features until it errors again.</p>",
      "votes": null,
      "replies": [
        {
          "id": 2241640,
          "author_name": "joseviteri",
          "author_url": "",
          "post_date": "05/01/2023 17:08:02",
          "content": "<p>Thanks for the guidance! I'll try it, at the current status I'm only viewing the elapsed_time feature.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 2241535,
      "author_name": "littlstar123",
      "author_url": "",
      "post_date": "05/01/2023 15:29:13",
      "content": "<p>This is just warning. And in fact, it is too difficult to inspect the bug for the limited code you published. </p>",
      "votes": null,
      "replies": [
        {
          "id": 2241639,
          "author_name": "joseviteri",
          "author_url": "",
          "post_date": "05/01/2023 17:07:19",
          "content": "<pre><code> ():\n    dfs = []\n    temp = df.groupby(by = [])[].() - df.groupby(by = [])[].()\n    temp = temp.rename()\n    dfs.append(temp)\n    dfs = dfs.fillna(-)\n    dfs = dfs.reset_index()\n    dfs = dfs.set_index()\n\n     dfs\n</code></pre>\n<p><a href=\"https://www.kaggle.com/littlstar123\" target=\"_blank\">@littlstar123</a> nothing special as you can see, the concat function is only looking at elapsed time.</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "2239518": "Hi all, \n\nnew to kaggle, I've been trying to submit my notebook for well over a week but I keep on running into an exception error. On the test dataset it works fine, no errors, the samplesubmission.csv is created as expected, when I submit it always throwback an error:\n\n```python\n235.5s\t201\t1/1 [==============================] - ETA: 0s\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b1/1 [==============================] - 0s 26ms/step\n241.2s\t202\t/opt/conda/lib/python3.7/site-packages/traitlets/traitlets.py:2935: FutureWarning: --Exporter.preprocessors=[\"remove_papermill_header.RemovePapermillHeader\"] for containers is deprecated in traitlets 5.0. You can pass `--Exporter.preprocessors item` ... multiple times to add items to a list.\n241.2s\t203\t  FutureWarning,\n241.2s\t204\t[NbConvertApp] Converting notebook __notebook__.ipynb to notebook\n241.9s\t205\t[NbConvertApp] Writing 98100 bytes to __notebook__.ipynb\n243.6s\t206\t/opt/conda/lib/python3.7/site-packages/traitlets/traitlets.py:2935: FutureWarning: --Exporter.preprocessors=[\"nbconvert.preprocessors.ExtractOutputPreprocessor\"] for containers is deprecated in traitlets 5.0. You can pass `--Exporter.preprocessors item` ... multiple times to add items to a list.\n243.6s\t207\t  FutureWarning,\n243.6s\t208\t[NbConvertApp] Converting notebook __notebook__.ipynb to html\n244.8s\t209\t[NbConvertApp] Writing 379881 bytes to __results__.html\n```\n\nWhat does it mean? This is very difficult to debug. This is my submission loop:\n\n```python\nlimits = {'0-4':(1,4), '5-12':(4,14), '13-22':(14,19)}\n\nfor (test, sample_submission) in iter_test:\n    \n    # FEATURE ENGINEER TEST DATA\n    df = concat_features(test)\n    \n    # INFER TEST DATA\n    grp = test.level_group.values[0]\n    a,b = limits[grp]\n    for t in range(a,b):\n        clf = MODELS[f\"question {t} model\"]\n        p = clf.predict(df)[0][0]\n        mask = sample_submission.session_id.str.contains(f'q{t}')\n        sample_submission.loc[mask,'correct'] = int( p > 0.65 )\n    \n    env.predict(sample_submission)\n```\n\n@philculliton",
    "2241241": "Hi @joseviteri , if it works on the test dataset, it may come from your concat_features function. It may run into something that didn't happen in the test dataset.  One way to test that is to simplify your concat_features to the minimum and add features until it errors again.",
    "2241535": "This is just warning. And in fact, it is too difficult to inspect the bug for the limited code you published.",
    "2241639": "```python\ndef concat_features(df):\n    dfs = []\n    temp = df.groupby(by = [\"session_id\"])[\"elapsed_time\"].max() - df.groupby(by = [\"session_id\"])[\"elapsed_time\"].min()\n    temp = temp.rename(\"elapsed_duration\")\n    dfs.append(temp)\n    dfs = dfs.fillna(-1)\n    dfs = dfs.reset_index()\n    dfs = dfs.set_index('session_id')\n    \n    return dfs\n```\n@littlstar123 nothing special as you can see, the concat function is only looking at elapsed time.",
    "2241640": "Thanks for the guidance! I'll try it, at the current status I'm only viewing the elapsed_time feature."
  },
  "source": "meta"
}