{
  "id": 228941,
  "title": "Why \"Submission Scoring Error\" ? ",
  "url": "/competitions/coleridgeinitiative-show-us-the-data/discussion/228941",
  "author_name": "",
  "post_date": "2021-03-27T10:20:34.144780400Z",
  "votes": 5,
  "comment_count": 8,
  "views": 0,
  "content": "<p>I don't know why my notebook shown \"Submission Scoring Error\". <br>\nDo anyone know how to debug ? </p>\n<p>I think that I submit the correct format. Or at lease Kaggle should tell me in detail what is wrong.</p>\n<p>This is the notebook.  <br>\n<a href=\"https://www.kaggle.com/tthien/meow-baseline\" target=\"_blank\">https://www.kaggle.com/tthien/meow-baseline</a></p>\n<p>Solve:</p>\n<ul>\n<li>When you submit your notebook, there are different (and more) file in test data.</li>\n<li>Each id.json need a line in submission.csv (empty line if you don't find anything) </li>\n</ul>\n<p>So my code, adding this FIXED the problem</p>\n<pre><code>for sec in section_list:\n    if not result.get(sec[\"id\"], None):\n        result[sec[\"id\"]] = \"\"\n</code></pre>\n<p>I updated the notebook version. </p>",
  "messages": [
    {
      "id": "1254076",
      "postDate": "03/27/2021 10:20:34",
      "content": "<p>I don't know why my notebook shown \"Submission Scoring Error\". <br>\nDo anyone know how to debug ? </p>\n<p>I think that I submit the correct format. Or at lease Kaggle should tell me in detail what is wrong.</p>\n<p>This is the notebook.  <br>\n<a href=\"https://www.kaggle.com/tthien/meow-baseline\" target=\"_blank\">https://www.kaggle.com/tthien/meow-baseline</a></p>\n<p>Solve:</p>\n<ul>\n<li>When you submit your notebook, there are different (and more) file in test data.</li>\n<li>Each id.json need a line in submission.csv (empty line if you don't find anything) </li>\n</ul>\n<p>So my code, adding this FIXED the problem</p>\n<pre><code>for sec in section_list:\n    if not result.get(sec[\"id\"], None):\n        result[sec[\"id\"]] = \"\"\n</code></pre>\n<p>I updated the notebook version. </p>",
      "rawMarkdown": "I don't know why my notebook shown \"Submission Scoring Error\". \nDo anyone know how to debug ? \n\nI think that I submit the correct format. Or at lease Kaggle should tell me in detail what is wrong.\n\nThis is the notebook.  \nhttps://www.kaggle.com/tthien/meow-baseline\n\nSolve:\n- When you submit your notebook, there are different (and more) file in test data.\n- Each id.json need a line in submission.csv (empty line if you don't find anything) \n\nSo my code, adding this FIXED the problem\n\n```\nfor sec in section_list:\n    if not result.get(sec[\"id\"], None):\n        result[sec[\"id\"]] = \"\"\n```\n\nI updated the notebook version.",
      "votes": null
    },
    {
      "id": "1255028",
      "postDate": "03/28/2021 10:55:30",
      "content": "<p>I have the same problem</p>",
      "rawMarkdown": "I have the same problem",
      "votes": null
    },
    {
      "id": "1255980",
      "postDate": "03/29/2021 12:45:47",
      "content": "<p>did you fix it ? Could you let me know if you can. </p>",
      "rawMarkdown": "did you fix it ? Could you let me know if you can.",
      "votes": null
    },
    {
      "id": "1257006",
      "postDate": "03/30/2021 12:57:08",
      "content": "<p>Hi, </p>\n<p>Make sure that you are naming the file as \"submission.csv\" and making index=False while saving.</p>\n<p>i.e.</p>\n<blockquote>\n  <p>submission_df.to_csv(\"submission.csv\", index=False)</p>\n</blockquote>\n<p>Hope it helps!</p>",
      "rawMarkdown": "Hi, \n\nMake sure that you are naming the file as \"submission.csv\" and making index=False while saving.\n\ni.e.\n\n> submission_df.to_csv(\"submission.csv\", index=False)\n\nHope it helps!",
      "votes": null
    },
    {
      "id": "1257090",
      "postDate": "03/30/2021 14:11:50",
      "content": "<blockquote>\n  <p>result_pd.to_csv(\"submission.csv\", index=False)<br>\n  Yes I do. <br>\n  This is a notebook that failed. <br>\n  <a href=\"https://www.kaggle.com/tthien/meow-baseline\" target=\"_blank\">https://www.kaggle.com/tthien/meow-baseline</a></p>\n</blockquote>",
      "rawMarkdown": "> result_pd.to_csv(\"submission.csv\", index=False)\nYes I do. \nThis is a notebook that failed. \nhttps://www.kaggle.com/tthien/meow-baseline",
      "votes": null
    },
    {
      "id": "1257132",
      "postDate": "03/30/2021 14:57:37",
      "content": "<p>In your code, you have an \"<strong>if</strong> x\" condition, but you are <strong>missing else condition</strong>.</p>\n<pre><code>        x = re.search(data_name, clean_text)\n        if x: \n            ...\n            result[sec[\"id\"]] = ...\n</code></pre>\n<p>Because of this, your output csv is missing some lines and throwing \"Submission Scoring Error\"</p>",
      "rawMarkdown": "In your code, you have an \"**if** x\" condition, but you are **missing else condition**.\n\n```\n        x = re.search(data_name, clean_text)\n        if x: \n            ...\n            result[sec[\"id\"]] = ...\n\n```\nBecause of this, your output csv is missing some lines and throwing \"Submission Scoring Error\"",
      "votes": null
    },
    {
      "id": "1257216",
      "postDate": "03/30/2021 16:14:49",
      "content": "<p>thanks!!!!</p>",
      "rawMarkdown": "thanks!!!!",
      "votes": null
    },
    {
      "id": "1257279",
      "postDate": "03/30/2021 17:09:15",
      "content": "<p>Do we need to list all \"id\" here ? <br>\nI don't have \"else\" because I don't think I need to show ID with empty prediction. </p>",
      "rawMarkdown": "Do we need to list all \"id\" here ? \nI don't have \"else\" because I don't think I need to show ID with empty prediction.",
      "votes": null
    },
    {
      "id": "1257353",
      "postDate": "03/30/2021 18:46:01",
      "content": "<p>Solved, thanks <a href=\"https://www.kaggle.com/Sirish\" target=\"_blank\">@Sirish</a> </p>\n<p>The else cased is not where I need to fix (because that \"if\" for each \"data name\". However I got the idea, every id.json need a line, empty line if I don't find anything. </p>\n<p>So my code, adding this:</p>\n<pre><code>for sec in section_list:\n    if not result.get(sec[\"id\"], None):\n        result[sec[\"id\"]] = \"\"\n</code></pre>",
      "rawMarkdown": "Solved, thanks @Sirish \n\nThe else cased is not where I need to fix (because that \"if\" for each \"data name\". However I got the idea, every id.json need a line, empty line if I don't find anything. \n\nSo my code, adding this:\n\n```\nfor sec in section_list:\n    if not result.get(sec[\"id\"], None):\n        result[sec[\"id\"]] = \"\"\n```",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1255028,
      "author_name": "robotmsu92",
      "author_url": "",
      "post_date": "03/28/2021 10:55:30",
      "content": "<p>I have the same problem</p>",
      "votes": null,
      "replies": [
        {
          "id": 1255980,
          "author_name": "tthien",
          "author_url": "",
          "post_date": "03/29/2021 12:45:47",
          "content": "<p>did you fix it ? Could you let me know if you can. </p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1257006,
      "author_name": "pashupatigupta",
      "author_url": "",
      "post_date": "03/30/2021 12:57:08",
      "content": "<p>Hi, </p>\n<p>Make sure that you are naming the file as \"submission.csv\" and making index=False while saving.</p>\n<p>i.e.</p>\n<blockquote>\n  <p>submission_df.to_csv(\"submission.csv\", index=False)</p>\n</blockquote>\n<p>Hope it helps!</p>",
      "votes": null,
      "replies": [
        {
          "id": 1257090,
          "author_name": "tthien",
          "author_url": "",
          "post_date": "03/30/2021 14:11:50",
          "content": "<blockquote>\n  <p>result_pd.to_csv(\"submission.csv\", index=False)<br>\n  Yes I do. <br>\n  This is a notebook that failed. <br>\n  <a href=\"https://www.kaggle.com/tthien/meow-baseline\" target=\"_blank\">https://www.kaggle.com/tthien/meow-baseline</a></p>\n</blockquote>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1257132,
      "author_name": "sirishks",
      "author_url": "",
      "post_date": "03/30/2021 14:57:37",
      "content": "<p>In your code, you have an \"<strong>if</strong> x\" condition, but you are <strong>missing else condition</strong>.</p>\n<pre><code>        x = re.search(data_name, clean_text)\n        if x: \n            ...\n            result[sec[\"id\"]] = ...\n</code></pre>\n<p>Because of this, your output csv is missing some lines and throwing \"Submission Scoring Error\"</p>",
      "votes": null,
      "replies": [
        {
          "id": 1257216,
          "author_name": "robotmsu92",
          "author_url": "",
          "post_date": "03/30/2021 16:14:49",
          "content": "<p>thanks!!!!</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1257279,
          "author_name": "tthien",
          "author_url": "",
          "post_date": "03/30/2021 17:09:15",
          "content": "<p>Do we need to list all \"id\" here ? <br>\nI don't have \"else\" because I don't think I need to show ID with empty prediction. </p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1257353,
          "author_name": "tthien",
          "author_url": "",
          "post_date": "03/30/2021 18:46:01",
          "content": "<p>Solved, thanks <a href=\"https://www.kaggle.com/Sirish\" target=\"_blank\">@Sirish</a> </p>\n<p>The else cased is not where I need to fix (because that \"if\" for each \"data name\". However I got the idea, every id.json need a line, empty line if I don't find anything. </p>\n<p>So my code, adding this:</p>\n<pre><code>for sec in section_list:\n    if not result.get(sec[\"id\"], None):\n        result[sec[\"id\"]] = \"\"\n</code></pre>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1254076": "I don't know why my notebook shown \"Submission Scoring Error\". \nDo anyone know how to debug ? \n\nI think that I submit the correct format. Or at lease Kaggle should tell me in detail what is wrong.\n\nThis is the notebook.  \nhttps://www.kaggle.com/tthien/meow-baseline\n\nSolve:\n- When you submit your notebook, there are different (and more) file in test data.\n- Each id.json need a line in submission.csv (empty line if you don't find anything) \n\nSo my code, adding this FIXED the problem\n\n```\nfor sec in section_list:\n    if not result.get(sec[\"id\"], None):\n        result[sec[\"id\"]] = \"\"\n```\n\nI updated the notebook version.",
    "1255028": "I have the same problem",
    "1255980": "did you fix it ? Could you let me know if you can.",
    "1257006": "Hi, \n\nMake sure that you are naming the file as \"submission.csv\" and making index=False while saving.\n\ni.e.\n\n> submission_df.to_csv(\"submission.csv\", index=False)\n\nHope it helps!",
    "1257090": "> result_pd.to_csv(\"submission.csv\", index=False)\nYes I do. \nThis is a notebook that failed. \nhttps://www.kaggle.com/tthien/meow-baseline",
    "1257132": "In your code, you have an \"**if** x\" condition, but you are **missing else condition**.\n\n```\n        x = re.search(data_name, clean_text)\n        if x: \n            ...\n            result[sec[\"id\"]] = ...\n\n```\nBecause of this, your output csv is missing some lines and throwing \"Submission Scoring Error\"",
    "1257216": "thanks!!!!",
    "1257279": "Do we need to list all \"id\" here ? \nI don't have \"else\" because I don't think I need to show ID with empty prediction.",
    "1257353": "Solved, thanks @Sirish \n\nThe else cased is not where I need to fix (because that \"if\" for each \"data name\". However I got the idea, every id.json need a line, empty line if I don't find anything. \n\nSo my code, adding this:\n\n```\nfor sec in section_list:\n    if not result.get(sec[\"id\"], None):\n        result[sec[\"id\"]] = \"\"\n```"
  },
  "source": "meta"
}