{
  "id": 250249,
  "title": "Submission error during public scoring - No idea why this fails, please help :)",
  "url": "/competitions/mlb-player-digital-engagement-forecasting/discussion/250249",
  "author_name": "",
  "post_date": "2021-07-01T20:33:18.309080200Z",
  "votes": 1,
  "comment_count": 5,
  "views": 0,
  "content": "<p>Hello Kagglers, I have tried everything, no idea why this simple notebook is failing.</p>\n<p>I do some basic feature engineering, adding two age variables, i generate a prediction, and the live test works fine. When I submit for public scoring i get an error.</p>\n<p>Any help would be appreciated:<br>\n<a href=\"https://www.kaggle.com/echozuluecho/mlb-simple-model-using-player-ages\" target=\"_blank\">https://www.kaggle.com/echozuluecho/mlb-simple-model-using-player-ages</a></p>",
  "messages": [
    {
      "id": "1372560",
      "postDate": "07/01/2021 20:33:18",
      "content": "<p>Hello Kagglers, I have tried everything, no idea why this simple notebook is failing.</p>\n<p>I do some basic feature engineering, adding two age variables, i generate a prediction, and the live test works fine. When I submit for public scoring i get an error.</p>\n<p>Any help would be appreciated:<br>\n<a href=\"https://www.kaggle.com/echozuluecho/mlb-simple-model-using-player-ages\" target=\"_blank\">https://www.kaggle.com/echozuluecho/mlb-simple-model-using-player-ages</a></p>",
      "rawMarkdown": "Hello Kagglers, I have tried everything, no idea why this simple notebook is failing.\n\nI do some basic feature engineering, adding two age variables, i generate a prediction, and the live test works fine. When I submit for public scoring i get an error.\n\nAny help would be appreciated:\nhttps://www.kaggle.com/echozuluecho/mlb-simple-model-using-player-ages",
      "votes": null
    },
    {
      "id": "1372566",
      "postDate": "07/01/2021 20:43:36",
      "content": "<p>It looks like your <code>date</code> and <code>date_playerId</code> columns in each row don't match with the sample submission. </p>",
      "rawMarkdown": "It looks like your `date` and `date_playerId` columns in each row don't match with the sample submission.",
      "votes": null
    },
    {
      "id": "1372822",
      "postDate": "07/02/2021 04:20:37",
      "content": "<p>Thanks for your help!</p>\n<p>Turns out that my feature engineering code added a \"date\" field to the submission file, and the submission file appears to only require date_playerId (\"date\" is being used as index name).</p>\n<p>This did the trick:</p>\n<p>final_headers = [\"date_playerId\", \"target1\", \"target2\", \"target3\", \"target4\"]<br>\nsample_prediction_df = sample_prediction_df[final_headers].copy()</p>\n<p>Thanks again for the help <a href=\"https://www.kaggle.com/jpmiller\" target=\"_blank\">@jpmiller</a> </p>",
      "rawMarkdown": "Thanks for your help!\n\nTurns out that my feature engineering code added a \"date\" field to the submission file, and the submission file appears to only require date_playerId (\"date\" is being used as index name).\n\nThis did the trick:\n\nfinal_headers = [\"date_playerId\", \"target1\", \"target2\", \"target3\", \"target4\"]\nsample_prediction_df = sample_prediction_df[final_headers].copy()\n\nThanks again for the help @jpmiller",
      "votes": null
    },
    {
      "id": "1375803",
      "postDate": "07/04/2021 13:46:43",
      "content": "<p>Do we have to keep the <code>date</code> column in the submission dataframe? In example_sample_submission.csv there is a `date' column.</p>",
      "rawMarkdown": "Do we have to keep the `date` column in the submission dataframe? In example_sample_submission.csv there is a `date' column.",
      "votes": null
    },
    {
      "id": "1375949",
      "postDate": "07/04/2021 15:20:28",
      "content": "<p>Hi <a href=\"https://www.kaggle.com/pritommojumder\" target=\"_blank\">@pritommojumder</a> , we don't! That's the issue I had. The \"date\" column is the name of the index, so you dont have to write a new column called \"date\"…the example_sample_submission.csv shows the first column which is the index.</p>\n<p>So as long as you write a submission file like this you should be fine:</p>\n<p><code>\nfinal_headers = [\"date_playerId\", \"target1\", \"target2\", \"target3\", \"target4\"]\nsample_prediction_df = sample_prediction_df[final_headers].copy()\n</code></p>",
      "rawMarkdown": "Hi @pritommojumder , we don't! That's the issue I had. The \"date\" column is the name of the index, so you dont have to write a new column called \"date\"...the example_sample_submission.csv shows the first column which is the index.\n\nSo as long as you write a submission file like this you should be fine:\n\n``\nfinal_headers = [\"date_playerId\", \"target1\", \"target2\", \"target3\", \"target4\"]\nsample_prediction_df = sample_prediction_df[final_headers].copy()\n``",
      "votes": null
    },
    {
      "id": "1375971",
      "postDate": "07/04/2021 15:55:02",
      "content": "<p>Thank you for your response. Do you see any problem in my submission process? I'm getting <code>Notebook Threw Exception</code> again and again. I can't fix it. <br>\n<a href=\"https://www.kaggle.com/pritommojumder/mlb-digital-forecasting\" target=\"_blank\">https://www.kaggle.com/pritommojumder/mlb-digital-forecasting</a></p>",
      "rawMarkdown": "Thank you for your response. Do you see any problem in my submission process? I'm getting `Notebook Threw Exception` again and again. I can't fix it. \nhttps://www.kaggle.com/pritommojumder/mlb-digital-forecasting",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1372566,
      "author_name": "jpmiller",
      "author_url": "",
      "post_date": "07/01/2021 20:43:36",
      "content": "<p>It looks like your <code>date</code> and <code>date_playerId</code> columns in each row don't match with the sample submission. </p>",
      "votes": null,
      "replies": [
        {
          "id": 1372822,
          "author_name": "echozuluecho",
          "author_url": "",
          "post_date": "07/02/2021 04:20:37",
          "content": "<p>Thanks for your help!</p>\n<p>Turns out that my feature engineering code added a \"date\" field to the submission file, and the submission file appears to only require date_playerId (\"date\" is being used as index name).</p>\n<p>This did the trick:</p>\n<p>final_headers = [\"date_playerId\", \"target1\", \"target2\", \"target3\", \"target4\"]<br>\nsample_prediction_df = sample_prediction_df[final_headers].copy()</p>\n<p>Thanks again for the help <a href=\"https://www.kaggle.com/jpmiller\" target=\"_blank\">@jpmiller</a> </p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1375803,
          "author_name": "pritommojumder",
          "author_url": "",
          "post_date": "07/04/2021 13:46:43",
          "content": "<p>Do we have to keep the <code>date</code> column in the submission dataframe? In example_sample_submission.csv there is a `date' column.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1375949,
          "author_name": "echozuluecho",
          "author_url": "",
          "post_date": "07/04/2021 15:20:28",
          "content": "<p>Hi <a href=\"https://www.kaggle.com/pritommojumder\" target=\"_blank\">@pritommojumder</a> , we don't! That's the issue I had. The \"date\" column is the name of the index, so you dont have to write a new column called \"date\"…the example_sample_submission.csv shows the first column which is the index.</p>\n<p>So as long as you write a submission file like this you should be fine:</p>\n<p><code>\nfinal_headers = [\"date_playerId\", \"target1\", \"target2\", \"target3\", \"target4\"]\nsample_prediction_df = sample_prediction_df[final_headers].copy()\n</code></p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1375971,
          "author_name": "pritommojumder",
          "author_url": "",
          "post_date": "07/04/2021 15:55:02",
          "content": "<p>Thank you for your response. Do you see any problem in my submission process? I'm getting <code>Notebook Threw Exception</code> again and again. I can't fix it. <br>\n<a href=\"https://www.kaggle.com/pritommojumder/mlb-digital-forecasting\" target=\"_blank\">https://www.kaggle.com/pritommojumder/mlb-digital-forecasting</a></p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1372560": "Hello Kagglers, I have tried everything, no idea why this simple notebook is failing.\n\nI do some basic feature engineering, adding two age variables, i generate a prediction, and the live test works fine. When I submit for public scoring i get an error.\n\nAny help would be appreciated:\nhttps://www.kaggle.com/echozuluecho/mlb-simple-model-using-player-ages",
    "1372566": "It looks like your `date` and `date_playerId` columns in each row don't match with the sample submission.",
    "1372822": "Thanks for your help!\n\nTurns out that my feature engineering code added a \"date\" field to the submission file, and the submission file appears to only require date_playerId (\"date\" is being used as index name).\n\nThis did the trick:\n\nfinal_headers = [\"date_playerId\", \"target1\", \"target2\", \"target3\", \"target4\"]\nsample_prediction_df = sample_prediction_df[final_headers].copy()\n\nThanks again for the help @jpmiller",
    "1375803": "Do we have to keep the `date` column in the submission dataframe? In example_sample_submission.csv there is a `date' column.",
    "1375949": "Hi @pritommojumder , we don't! That's the issue I had. The \"date\" column is the name of the index, so you dont have to write a new column called \"date\"...the example_sample_submission.csv shows the first column which is the index.\n\nSo as long as you write a submission file like this you should be fine:\n\n``\nfinal_headers = [\"date_playerId\", \"target1\", \"target2\", \"target3\", \"target4\"]\nsample_prediction_df = sample_prediction_df[final_headers].copy()\n``",
    "1375971": "Thank you for your response. Do you see any problem in my submission process? I'm getting `Notebook Threw Exception` again and again. I can't fix it. \nhttps://www.kaggle.com/pritommojumder/mlb-digital-forecasting"
  },
  "source": "meta"
}