{
  "id": 205990,
  "title": "Submission Error: \"CSV-File not found\"",
  "url": "/competitions/cassava-leaf-disease-classification/discussion/205990",
  "author_name": "",
  "post_date": "2020-12-22T18:26:38.272197800Z",
  "votes": null,
  "comment_count": 7,
  "views": 0,
  "content": "<p>I tried several times already but the my submission notebook isn't working somehow and they can't find my submission-file. I dont think that it has anything to do with the fact that the public test-file is only one instance bc I also ran my notebook with the training data and it worked. But now when I submit the notebook it runs for about 2h and then gives me the error mentioned above.<br>\nthis is how I submit my data:<br>\n<code>def convert_float(image,label):</code><br>\n<code>return tf.cast(image,tf.float32),label</code></p>\n<p><code>test_data = test_data.map(convert_float)</code><br>\n<code>test_images_data = test_data.map(lambda image,label: image)</code></p>\n<p><code>test_pred_prob = model.predict(test_images_data)</code></p>\n<p><code>test_pred = test_pred_prob.argmax(axis=1)</code></p>\n<p><code>test_data_ids = [ids.numpy() for (image,ids) in test_data][0]</code><br>\n<code>test_data_ids = [i.decode() for i in test_data_ids]</code></p>\n<p><code>submission_df = pd.DataFrame({\"image_id\":test_data_ids,\"label\":test_pred})</code><br>\n<code>submission_df.to_csv(\"submission.csv\",index=False)</code></p>\n<p>if anybody knows what's going and could tell me that would be much appreciated.Thanks🙌🏻</p>",
  "messages": [
    {
      "id": "1122834",
      "postDate": "12/22/2020 18:26:38",
      "content": "<p>I tried several times already but the my submission notebook isn't working somehow and they can't find my submission-file. I dont think that it has anything to do with the fact that the public test-file is only one instance bc I also ran my notebook with the training data and it worked. But now when I submit the notebook it runs for about 2h and then gives me the error mentioned above.<br>\nthis is how I submit my data:<br>\n<code>def convert_float(image,label):</code><br>\n<code>return tf.cast(image,tf.float32),label</code></p>\n<p><code>test_data = test_data.map(convert_float)</code><br>\n<code>test_images_data = test_data.map(lambda image,label: image)</code></p>\n<p><code>test_pred_prob = model.predict(test_images_data)</code></p>\n<p><code>test_pred = test_pred_prob.argmax(axis=1)</code></p>\n<p><code>test_data_ids = [ids.numpy() for (image,ids) in test_data][0]</code><br>\n<code>test_data_ids = [i.decode() for i in test_data_ids]</code></p>\n<p><code>submission_df = pd.DataFrame({\"image_id\":test_data_ids,\"label\":test_pred})</code><br>\n<code>submission_df.to_csv(\"submission.csv\",index=False)</code></p>\n<p>if anybody knows what's going and could tell me that would be much appreciated.Thanks🙌🏻</p>",
      "rawMarkdown": "I tried several times already but the my submission notebook isn't working somehow and they can't find my submission-file. I dont think that it has anything to do with the fact that the public test-file is only one instance bc I also ran my notebook with the training data and it worked. But now when I submit the notebook it runs for about 2h and then gives me the error mentioned above.\nthis is how I submit my data:\n`def convert_float(image,label):`\n`    return tf.cast(image,tf.float32),label`\n\n`test_data = test_data.map(convert_float)`\n`test_images_data = test_data.map(lambda image,label: image)`\n\n`test_pred_prob = model.predict(test_images_data)`\n\n`test_pred = test_pred_prob.argmax(axis=1)`\n\n`test_data_ids = [ids.numpy() for (image,ids) in test_data][0]`\n`test_data_ids = [i.decode() for i in test_data_ids]`\n\n`submission_df = pd.DataFrame({\"image_id\":test_data_ids,\"label\":test_pred})`\n`submission_df.to_csv(\"submission.csv\",index=False)`\n\nif anybody knows what's going and could tell me that would be much appreciated.Thanks🙌🏻",
      "votes": null
    },
    {
      "id": "1123069",
      "postDate": "12/22/2020 21:49:21",
      "content": "<p>if the submission fails to run to completion, it could display that error.  One reason could be running out of memory. There could be other reasons too.</p>",
      "rawMarkdown": "if the submission fails to run to completion, it could display that error.  One reason could be running out of memory. There could be other reasons too.",
      "votes": null
    },
    {
      "id": "1123090",
      "postDate": "12/22/2020 22:24:47",
      "content": "<p>is there anything to prevent that from happening?</p>",
      "rawMarkdown": "is there anything to prevent that from happening?",
      "votes": null
    },
    {
      "id": "1123235",
      "postDate": "12/23/2020 04:18:21",
      "content": "<p>For one, you can use a smaller model or a smaller resolution for your images. For example, use VGG and see if your submission passes or use an image size of 224x224. If memory is an issue, then your submission will most likely pass but it may not score well. Then you can start going to bigger models, and or higher resolutions. Also, a big value for batch size could cause this. You may also want to play around with the batch size. start at say the batch size of 8 and go up…</p>",
      "rawMarkdown": "For one, you can use a smaller model or a smaller resolution for your images. For example, use VGG and see if your submission passes or use an image size of 224x224. If memory is an issue, then your submission will most likely pass but it may not score well. Then you can start going to bigger models, and or higher resolutions. Also, a big value for batch size could cause this. You may also want to play around with the batch size. start at say the batch size of 8 and go up...",
      "votes": null
    },
    {
      "id": "1136791",
      "postDate": "01/03/2021 12:36:02",
      "content": "<p>Do you know if it might help if I enable the gpu? </p>",
      "rawMarkdown": "Do you know if it might help if I enable the gpu?",
      "votes": null
    },
    {
      "id": "1138463",
      "postDate": "01/04/2021 17:48:01",
      "content": "<p>yes, with GPU your code runs much faster and you would not hit the 9-hour limit. Also, save and run your code and see if submission.csv is created. It should only have one entry in it. <br>\nimage_id                     label<br>\n2216849948.jpg        4</p>",
      "rawMarkdown": "yes, with GPU your code runs much faster and you would not hit the 9-hour limit. Also, save and run your code and see if submission.csv is created. It should only have one entry in it. \nimage_id                     label\n2216849948.jpg        4",
      "votes": null
    },
    {
      "id": "1144505",
      "postDate": "01/08/2021 13:50:50",
      "content": "<p>yeah it works fine on the single instance </p>",
      "rawMarkdown": "yeah it works fine on the single instance",
      "votes": null
    },
    {
      "id": "1144699",
      "postDate": "01/08/2021 16:06:44",
      "content": "<p>it works now. I changed the way it gets the image_ids</p>",
      "rawMarkdown": "it works now. I changed the way it gets the image_ids",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1123069,
      "author_name": "kamranmo",
      "author_url": "",
      "post_date": "12/22/2020 21:49:21",
      "content": "<p>if the submission fails to run to completion, it could display that error.  One reason could be running out of memory. There could be other reasons too.</p>",
      "votes": null,
      "replies": [
        {
          "id": 1123090,
          "author_name": "docphilipp",
          "author_url": "",
          "post_date": "12/22/2020 22:24:47",
          "content": "<p>is there anything to prevent that from happening?</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1123235,
          "author_name": "kamranmo",
          "author_url": "",
          "post_date": "12/23/2020 04:18:21",
          "content": "<p>For one, you can use a smaller model or a smaller resolution for your images. For example, use VGG and see if your submission passes or use an image size of 224x224. If memory is an issue, then your submission will most likely pass but it may not score well. Then you can start going to bigger models, and or higher resolutions. Also, a big value for batch size could cause this. You may also want to play around with the batch size. start at say the batch size of 8 and go up…</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1136791,
          "author_name": "docphilipp",
          "author_url": "",
          "post_date": "01/03/2021 12:36:02",
          "content": "<p>Do you know if it might help if I enable the gpu? </p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1138463,
          "author_name": "kamranmo",
          "author_url": "",
          "post_date": "01/04/2021 17:48:01",
          "content": "<p>yes, with GPU your code runs much faster and you would not hit the 9-hour limit. Also, save and run your code and see if submission.csv is created. It should only have one entry in it. <br>\nimage_id                     label<br>\n2216849948.jpg        4</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1144505,
          "author_name": "docphilipp",
          "author_url": "",
          "post_date": "01/08/2021 13:50:50",
          "content": "<p>yeah it works fine on the single instance </p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1144699,
          "author_name": "docphilipp",
          "author_url": "",
          "post_date": "01/08/2021 16:06:44",
          "content": "<p>it works now. I changed the way it gets the image_ids</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1122834": "I tried several times already but the my submission notebook isn't working somehow and they can't find my submission-file. I dont think that it has anything to do with the fact that the public test-file is only one instance bc I also ran my notebook with the training data and it worked. But now when I submit the notebook it runs for about 2h and then gives me the error mentioned above.\nthis is how I submit my data:\n`def convert_float(image,label):`\n`    return tf.cast(image,tf.float32),label`\n\n`test_data = test_data.map(convert_float)`\n`test_images_data = test_data.map(lambda image,label: image)`\n\n`test_pred_prob = model.predict(test_images_data)`\n\n`test_pred = test_pred_prob.argmax(axis=1)`\n\n`test_data_ids = [ids.numpy() for (image,ids) in test_data][0]`\n`test_data_ids = [i.decode() for i in test_data_ids]`\n\n`submission_df = pd.DataFrame({\"image_id\":test_data_ids,\"label\":test_pred})`\n`submission_df.to_csv(\"submission.csv\",index=False)`\n\nif anybody knows what's going and could tell me that would be much appreciated.Thanks🙌🏻",
    "1123069": "if the submission fails to run to completion, it could display that error.  One reason could be running out of memory. There could be other reasons too.",
    "1123090": "is there anything to prevent that from happening?",
    "1123235": "For one, you can use a smaller model or a smaller resolution for your images. For example, use VGG and see if your submission passes or use an image size of 224x224. If memory is an issue, then your submission will most likely pass but it may not score well. Then you can start going to bigger models, and or higher resolutions. Also, a big value for batch size could cause this. You may also want to play around with the batch size. start at say the batch size of 8 and go up...",
    "1136791": "Do you know if it might help if I enable the gpu?",
    "1138463": "yes, with GPU your code runs much faster and you would not hit the 9-hour limit. Also, save and run your code and see if submission.csv is created. It should only have one entry in it. \nimage_id                     label\n2216849948.jpg        4",
    "1144505": "yeah it works fine on the single instance",
    "1144699": "it works now. I changed the way it gets the image_ids"
  },
  "source": "meta"
}