{
  "id": 498408,
  "title": "Still facing \"Submission Scoring Error\"",
  "url": "/competitions/birdclef-2024/discussion/498408",
  "author_name": "",
  "post_date": "2024-04-28T06:48:59.924677700Z",
  "votes": 2,
  "comment_count": 3,
  "views": 0,
  "content": "<p>I using this code for submission </p>\n<pre><code>\npred_df = pd.DataFrame(ids, columns=[])\npred_df.loc[:, CFG.class_names] = preds\n\n index, row  pred_df.iterrows():\n    row_id = row[]\n\n    \n    pred_row = pred_df[pred_df[] == row_id]\n\n    \n      pred_row.empty:\n        \n        pred_df.loc[index, pred_df.columns != ] = pred_row.iloc[, :]\n\n\npred_df.to_csv(, index=)\n\npred_df.head()\n</code></pre>\n<p>I took this example from here: <a href=\"https://www.kaggle.com/competitions/birdclef-2024/discussion/491165\" target=\"_blank\">https://www.kaggle.com/competitions/birdclef-2024/discussion/491165</a><br>\nAnd still having \"Submission Scoring Error\"</p>\n<p>Thank you for your help :)</p>",
  "messages": [
    {
      "id": "2780371",
      "postDate": "04/28/2024 06:48:59",
      "content": "<p>I using this code for submission </p>\n<pre><code>\npred_df = pd.DataFrame(ids, columns=[])\npred_df.loc[:, CFG.class_names] = preds\n\n index, row  pred_df.iterrows():\n    row_id = row[]\n\n    \n    pred_row = pred_df[pred_df[] == row_id]\n\n    \n      pred_row.empty:\n        \n        pred_df.loc[index, pred_df.columns != ] = pred_row.iloc[, :]\n\n\npred_df.to_csv(, index=)\n\npred_df.head()\n</code></pre>\n<p>I took this example from here: <a href=\"https://www.kaggle.com/competitions/birdclef-2024/discussion/491165\" target=\"_blank\">https://www.kaggle.com/competitions/birdclef-2024/discussion/491165</a><br>\nAnd still having \"Submission Scoring Error\"</p>\n<p>Thank you for your help :)</p>",
      "rawMarkdown": "I using this code for submission \n```python\n# Submit prediction\npred_df = pd.DataFrame(ids, columns=['row_id'])\npred_df.loc[:, CFG.class_names] = preds\n# Iterating through rows of subs DataFrame\nfor index, row in pred_df.iterrows():\n    row_id = row['row_id']\n\n    # Finding the corresponding row in pred_df\n    pred_row = pred_df[pred_df['row_id'] == row_id]\n\n    # Checking if a matching row is found\n    if not pred_row.empty:\n        # Assigning values from pred_df to subs DataFrame\n        pred_df.loc[index, pred_df.columns != 'row_id'] = pred_row.iloc[0, 1:]\n\n# Saving the updated subs DataFrame to a CSV file\npred_df.to_csv('submission.csv', index=False)\n# pred_df.to_csv('submission.csv',index=False)\npred_df.head()\n```\n\nI took this example from here: https://www.kaggle.com/competitions/birdclef-2024/discussion/491165\nAnd still having \"Submission Scoring Error\"\n\nThank you for your help :)",
      "votes": null
    },
    {
      "id": "2780374",
      "postDate": "04/28/2024 06:53:03",
      "content": "<p>Maybe start from a public notebook code?</p>",
      "rawMarkdown": "Maybe start from a public notebook code?",
      "votes": null
    },
    {
      "id": "2781206",
      "postDate": "04/28/2024 16:36:31",
      "content": "<p>I'm having the same problem, too… it really is baffling.  </p>\n<p>It seems like the submission needs to be geared to producing an empty submission file, but with the idea that when the test files are provided they will be processed and the submission file will be populated?  I feel like I'm doing that, but I still can't see what I might be doing wrong (<a href=\"https://www.kaggle.com/code/osprey2k/birdclef-2024-inference/notebook)\" target=\"_blank\">https://www.kaggle.com/code/osprey2k/birdclef-2024-inference/notebook)</a>.</p>\n<p>Edit: I found my problem: I included the word \"soundscape\" in my row_id as indicated in the \"Data\" description for this contest.</p>",
      "rawMarkdown": "I'm having the same problem, too... it really is baffling.  \n\nIt seems like the submission needs to be geared to producing an empty submission file, but with the idea that when the test files are provided they will be processed and the submission file will be populated?  I feel like I'm doing that, but I still can't see what I might be doing wrong (https://www.kaggle.com/code/osprey2k/birdclef-2024-inference/notebook).\n\nEdit: I found my problem: I included the word \"soundscape\" in my row_id as indicated in the \"Data\" description for this contest.",
      "votes": null
    },
    {
      "id": "2801457",
      "postDate": "05/08/2024 16:26:45",
      "content": "<p>Hey I think I might be running into the same issue. Just for clarification, the files in 'test_soundscapes/' take the form 'soundscape_xxxxx' correct? And if so, do you mean we should include the string 'soundscape_' in the row_id, or should we remove it and have the row id just be the 'xxxxx' part?</p>",
      "rawMarkdown": "Hey I think I might be running into the same issue. Just for clarification, the files in 'test_soundscapes/' take the form 'soundscape_xxxxx' correct? And if so, do you mean we should include the string 'soundscape_' in the row_id, or should we remove it and have the row id just be the 'xxxxx' part?",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 2780374,
      "author_name": "cpmpml",
      "author_url": "",
      "post_date": "04/28/2024 06:53:03",
      "content": "<p>Maybe start from a public notebook code?</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 2781206,
      "author_name": "osprey2k",
      "author_url": "",
      "post_date": "04/28/2024 16:36:31",
      "content": "<p>I'm having the same problem, too… it really is baffling.  </p>\n<p>It seems like the submission needs to be geared to producing an empty submission file, but with the idea that when the test files are provided they will be processed and the submission file will be populated?  I feel like I'm doing that, but I still can't see what I might be doing wrong (<a href=\"https://www.kaggle.com/code/osprey2k/birdclef-2024-inference/notebook)\" target=\"_blank\">https://www.kaggle.com/code/osprey2k/birdclef-2024-inference/notebook)</a>.</p>\n<p>Edit: I found my problem: I included the word \"soundscape\" in my row_id as indicated in the \"Data\" description for this contest.</p>",
      "votes": null,
      "replies": [
        {
          "id": 2801457,
          "author_name": "captk9000",
          "author_url": "",
          "post_date": "05/08/2024 16:26:45",
          "content": "<p>Hey I think I might be running into the same issue. Just for clarification, the files in 'test_soundscapes/' take the form 'soundscape_xxxxx' correct? And if so, do you mean we should include the string 'soundscape_' in the row_id, or should we remove it and have the row id just be the 'xxxxx' part?</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "2780371": "I using this code for submission \n```python\n# Submit prediction\npred_df = pd.DataFrame(ids, columns=['row_id'])\npred_df.loc[:, CFG.class_names] = preds\n# Iterating through rows of subs DataFrame\nfor index, row in pred_df.iterrows():\n    row_id = row['row_id']\n\n    # Finding the corresponding row in pred_df\n    pred_row = pred_df[pred_df['row_id'] == row_id]\n\n    # Checking if a matching row is found\n    if not pred_row.empty:\n        # Assigning values from pred_df to subs DataFrame\n        pred_df.loc[index, pred_df.columns != 'row_id'] = pred_row.iloc[0, 1:]\n\n# Saving the updated subs DataFrame to a CSV file\npred_df.to_csv('submission.csv', index=False)\n# pred_df.to_csv('submission.csv',index=False)\npred_df.head()\n```\n\nI took this example from here: https://www.kaggle.com/competitions/birdclef-2024/discussion/491165\nAnd still having \"Submission Scoring Error\"\n\nThank you for your help :)",
    "2780374": "Maybe start from a public notebook code?",
    "2781206": "I'm having the same problem, too... it really is baffling.  \n\nIt seems like the submission needs to be geared to producing an empty submission file, but with the idea that when the test files are provided they will be processed and the submission file will be populated?  I feel like I'm doing that, but I still can't see what I might be doing wrong (https://www.kaggle.com/code/osprey2k/birdclef-2024-inference/notebook).\n\nEdit: I found my problem: I included the word \"soundscape\" in my row_id as indicated in the \"Data\" description for this contest.",
    "2801457": "Hey I think I might be running into the same issue. Just for clarification, the files in 'test_soundscapes/' take the form 'soundscape_xxxxx' correct? And if so, do you mean we should include the string 'soundscape_' in the row_id, or should we remove it and have the row id just be the 'xxxxx' part?"
  },
  "source": "meta"
}