{
  "id": 217302,
  "title": "Getting submission scoring error even though the format of my output seems to be correct.",
  "url": "/competitions/cassava-leaf-disease-classification/discussion/217302",
  "author_name": "",
  "post_date": "2021-02-06T08:41:51.480512Z",
  "votes": 1,
  "comment_count": 4,
  "views": 0,
  "content": "<p><a href=\"https://www.kaggle.com/hubertwojewoda/cassava-leaves-fastai-inference\" target=\"_blank\">My inference notebook using fastai.</a> It seems to me that my predictions are saved in the correct format, but every time I try to submit I get an error. Could someone point out what's wrong?</p>",
  "messages": [
    {
      "id": "1188442",
      "postDate": "02/06/2021 08:41:51",
      "content": "<p><a href=\"https://www.kaggle.com/hubertwojewoda/cassava-leaves-fastai-inference\" target=\"_blank\">My inference notebook using fastai.</a> It seems to me that my predictions are saved in the correct format, but every time I try to submit I get an error. Could someone point out what's wrong?</p>",
      "rawMarkdown": "[My inference notebook using fastai.](https://www.kaggle.com/hubertwojewoda/cassava-leaves-fastai-inference) It seems to me that my predictions are saved in the correct format, but every time I try to submit I get an error. Could someone point out what's wrong?",
      "votes": null
    },
    {
      "id": "1189007",
      "postDate": "02/06/2021 16:39:15",
      "content": "<p>Not sure but maybe this part </p>\n<p><code>submissions = pd.DataFrame({'image_id':[str(i)[-14:] for i in test_images.ls()], 'label':test_preds})</code> </p>\n<p>looks risky to me… How do you know that all image_id are at best length 14?</p>",
      "rawMarkdown": "Not sure but maybe this part \n\n``submissions = pd.DataFrame({'image_id':[str(i)[-14:] for i in test_images.ls()], 'label':test_preds})`` \n\nlooks risky to me... How do you know that all image_id are at best length 14?",
      "votes": null
    },
    {
      "id": "1189179",
      "postDate": "02/06/2021 19:14:39",
      "content": "<p>I suppose you're right, I could use regular expressions instead I think.</p>",
      "rawMarkdown": "I suppose you're right, I could use regular expressions instead I think.",
      "votes": null
    },
    {
      "id": "1189197",
      "postDate": "02/06/2021 19:35:54",
      "content": "<p>I do not know precisely what name <code>i</code> is in this context. If it holds a filepath, like <code>/test_images/12345.jpg</code>, then you can split <code>12345.jpg</code> via <code>os.path.basename(i)</code>.</p>",
      "rawMarkdown": "I do not know precisely what name ``i`` is in this context. If it holds a filepath, like ``/test_images/12345.jpg``, then you can split ``12345.jpg`` via ``os.path.basename(i)``.",
      "votes": null
    },
    {
      "id": "1189505",
      "postDate": "02/07/2021 04:37:14",
      "content": "<p>Thanks, I was finally able to submit.</p>",
      "rawMarkdown": "Thanks, I was finally able to submit.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1189007,
      "author_name": "morodertobias",
      "author_url": "",
      "post_date": "02/06/2021 16:39:15",
      "content": "<p>Not sure but maybe this part </p>\n<p><code>submissions = pd.DataFrame({'image_id':[str(i)[-14:] for i in test_images.ls()], 'label':test_preds})</code> </p>\n<p>looks risky to me… How do you know that all image_id are at best length 14?</p>",
      "votes": null,
      "replies": [
        {
          "id": 1189179,
          "author_name": "hubertwojewoda",
          "author_url": "",
          "post_date": "02/06/2021 19:14:39",
          "content": "<p>I suppose you're right, I could use regular expressions instead I think.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1189197,
          "author_name": "morodertobias",
          "author_url": "",
          "post_date": "02/06/2021 19:35:54",
          "content": "<p>I do not know precisely what name <code>i</code> is in this context. If it holds a filepath, like <code>/test_images/12345.jpg</code>, then you can split <code>12345.jpg</code> via <code>os.path.basename(i)</code>.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1189505,
          "author_name": "hubertwojewoda",
          "author_url": "",
          "post_date": "02/07/2021 04:37:14",
          "content": "<p>Thanks, I was finally able to submit.</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1188442": "[My inference notebook using fastai.](https://www.kaggle.com/hubertwojewoda/cassava-leaves-fastai-inference) It seems to me that my predictions are saved in the correct format, but every time I try to submit I get an error. Could someone point out what's wrong?",
    "1189007": "Not sure but maybe this part \n\n``submissions = pd.DataFrame({'image_id':[str(i)[-14:] for i in test_images.ls()], 'label':test_preds})`` \n\nlooks risky to me... How do you know that all image_id are at best length 14?",
    "1189179": "I suppose you're right, I could use regular expressions instead I think.",
    "1189197": "I do not know precisely what name ``i`` is in this context. If it holds a filepath, like ``/test_images/12345.jpg``, then you can split ``12345.jpg`` via ``os.path.basename(i)``.",
    "1189505": "Thanks, I was finally able to submit."
  },
  "source": "meta"
}