{
  "id": 501416,
  "title": "Submission error \"generated a submission file with incorrect format\"",
  "url": "/competitions/birdclef-2024/discussion/501416",
  "author_name": "",
  "post_date": "2024-05-09T05:41:32.989957600Z",
  "votes": 1,
  "comment_count": 3,
  "views": 0,
  "content": "<p>😭😭😭\"Your notebook generated a submission file with incorrect format. Some examples causing this are: wrong number of rows or columns, empty values, an incorrect data type for a value, or invalid submission values from what is expected.\"<br>\nI submitted several times, and the overall code can run normally, but no matter how I set the value of each class, there is always a submission error. Has anyone encountered a similar problem? Or does the submission file need to be empty ,like just the head of sample_submission.csv, when submitting for the first time? I am really confused.<br>\nI have create a dataset containing my submission file, hope some one can help me😭<br>\n<a href=\"https://www.kaggle.com/datasets/tanxxx/submission-error-examples\" target=\"_blank\">https://www.kaggle.com/datasets/tanxxx/submission-error-examples</a></p>",
  "messages": [
    {
      "id": "2802617",
      "postDate": "05/09/2024 05:41:32",
      "content": "<p>😭😭😭\"Your notebook generated a submission file with incorrect format. Some examples causing this are: wrong number of rows or columns, empty values, an incorrect data type for a value, or invalid submission values from what is expected.\"<br>\nI submitted several times, and the overall code can run normally, but no matter how I set the value of each class, there is always a submission error. Has anyone encountered a similar problem? Or does the submission file need to be empty ,like just the head of sample_submission.csv, when submitting for the first time? I am really confused.<br>\nI have create a dataset containing my submission file, hope some one can help me😭<br>\n<a href=\"https://www.kaggle.com/datasets/tanxxx/submission-error-examples\" target=\"_blank\">https://www.kaggle.com/datasets/tanxxx/submission-error-examples</a></p>",
      "rawMarkdown": "😭😭😭\"Your notebook generated a submission file with incorrect format. Some examples causing this are: wrong number of rows or columns, empty values, an incorrect data type for a value, or invalid submission values from what is expected.\"\nI submitted several times, and the overall code can run normally, but no matter how I set the value of each class, there is always a submission error. Has anyone encountered a similar problem? Or does the submission file need to be empty ,like just the head of sample_submission.csv, when submitting for the first time? I am really confused.\nI have create a dataset containing my submission file, hope some one can help me😭\nhttps://www.kaggle.com/datasets/tanxxx/submission-error-examples",
      "votes": null
    },
    {
      "id": "2802734",
      "postDate": "05/09/2024 06:40:38",
      "content": "<pre><code> pred.shape[] == (df_test) * :\n     (df_test) &lt; :\n        sub_df = pd.DataFrame(columns=[]+bird_cols)\n    sub_df.to_csv(,index=)\n</code></pre>\n<p>if have inserted this code to the end of my code, still got \"generated a submission file with incorrect format\" instead of \"submission file <br>\n not found\", It's really weird.</p>",
      "rawMarkdown": "```python\nif pred.shape[0] == len(df_test) * 48:\n    if len(df_test) < 500:\n        sub_df = pd.DataFrame(columns=['row_id']+bird_cols)\n    sub_df.to_csv('submission.csv',index=False)\n```\nif have inserted this code to the end of my code, still got \"generated a submission file with incorrect format\" instead of \"submission file \n not found\", It's really weird.",
      "votes": null
    },
    {
      "id": "2802979",
      "postDate": "05/09/2024 09:06:28",
      "content": "<p>Hi, I think you have added the prefix \"soundscape_\" in your row_id, haven't you !?<br>\nIf so, you dont need to do that, as explain <a href=\"https://www.kaggle.com/competitions/birdclef-2024/discussion/490964#2735769\" target=\"_blank\">here</a></p>",
      "rawMarkdown": "Hi, I think you have added the prefix \"soundscape_\" in your row_id, haven't you !?\nIf so, you dont need to do that, as explain [here] (https://www.kaggle.com/competitions/birdclef-2024/discussion/490964#2735769)",
      "votes": null
    },
    {
      "id": "2802995",
      "postDate": "05/09/2024 09:19:27",
      "content": "<p>Thanks LHK for your reply, i just use the filename of each ogg file as the row_id, with code below:</p>\n<pre><code>file = \nrow_ids = [  i  ()]\n</code></pre>\n<p>so i actually didn't add any prefix, and just using the filename.</p>",
      "rawMarkdown": "Thanks LHK for your reply, i just use the filename of each ogg file as the row_id, with code below:\n```python\nfile = 'soundscape_2113145'\nrow_ids = [f'{file}_{(i+1)*5}' for i in range(48)]\n```\nso i actually didn't add any prefix, and just using the filename.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 2802734,
      "author_name": "tanxxx",
      "author_url": "",
      "post_date": "05/09/2024 06:40:38",
      "content": "<pre><code> pred.shape[] == (df_test) * :\n     (df_test) &lt; :\n        sub_df = pd.DataFrame(columns=[]+bird_cols)\n    sub_df.to_csv(,index=)\n</code></pre>\n<p>if have inserted this code to the end of my code, still got \"generated a submission file with incorrect format\" instead of \"submission file <br>\n not found\", It's really weird.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 2802979,
      "author_name": "lmhongkhnh",
      "author_url": "",
      "post_date": "05/09/2024 09:06:28",
      "content": "<p>Hi, I think you have added the prefix \"soundscape_\" in your row_id, haven't you !?<br>\nIf so, you dont need to do that, as explain <a href=\"https://www.kaggle.com/competitions/birdclef-2024/discussion/490964#2735769\" target=\"_blank\">here</a></p>",
      "votes": null,
      "replies": [
        {
          "id": 2802995,
          "author_name": "tanxxx",
          "author_url": "",
          "post_date": "05/09/2024 09:19:27",
          "content": "<p>Thanks LHK for your reply, i just use the filename of each ogg file as the row_id, with code below:</p>\n<pre><code>file = \nrow_ids = [  i  ()]\n</code></pre>\n<p>so i actually didn't add any prefix, and just using the filename.</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "2802617": "😭😭😭\"Your notebook generated a submission file with incorrect format. Some examples causing this are: wrong number of rows or columns, empty values, an incorrect data type for a value, or invalid submission values from what is expected.\"\nI submitted several times, and the overall code can run normally, but no matter how I set the value of each class, there is always a submission error. Has anyone encountered a similar problem? Or does the submission file need to be empty ,like just the head of sample_submission.csv, when submitting for the first time? I am really confused.\nI have create a dataset containing my submission file, hope some one can help me😭\nhttps://www.kaggle.com/datasets/tanxxx/submission-error-examples",
    "2802734": "```python\nif pred.shape[0] == len(df_test) * 48:\n    if len(df_test) < 500:\n        sub_df = pd.DataFrame(columns=['row_id']+bird_cols)\n    sub_df.to_csv('submission.csv',index=False)\n```\nif have inserted this code to the end of my code, still got \"generated a submission file with incorrect format\" instead of \"submission file \n not found\", It's really weird.",
    "2802979": "Hi, I think you have added the prefix \"soundscape_\" in your row_id, haven't you !?\nIf so, you dont need to do that, as explain [here] (https://www.kaggle.com/competitions/birdclef-2024/discussion/490964#2735769)",
    "2802995": "Thanks LHK for your reply, i just use the filename of each ogg file as the row_id, with code below:\n```python\nfile = 'soundscape_2113145'\nrow_ids = [f'{file}_{(i+1)*5}' for i in range(48)]\n```\nso i actually didn't add any prefix, and just using the filename."
  },
  "source": "meta"
}