{
  "id": 228549,
  "title": "Solution of \"Submission CSV Not Found\"",
  "url": "/competitions/hubmap-kidney-segmentation/discussion/228549",
  "author_name": "Daegwon B",
  "post_date": "2021-03-25T07:51:17.676000",
  "votes": 5,
  "comment_count": 12,
  "views": 0,
  "content": "<p>Hello!</p>\n<p>When We submitted custom way, we could not get the score.  </p>\n<p>Our code does not use more than 7 GB memory while the notebook is running.   </p>\n<p>Even the code is successfully committed.  </p>\n<p>But we got a only message \"Submission CSV Not Found\".  </p>\n<pre><code>test_path = '../input/hubmap-kidney-segmentation/test/'\nsample_submission = pd.read_csv('../input/hubmap-kidney-segmentation/sample_submission.csv')\nsample_submission = sample_submission.set_index('id')\ntest_files = sample_submission.index.tolist()\n\nfor step, person_idx in enumerate(test_files):\n\n    print(f'load {step+1}/{len(test_files)} data...')\n    img = tiff.imread(test_path + person_idx + '.tiff').squeeze()\n    if img.shape[0] == 3:\n        img = img.transpose(1,2,0)\n\n    ################\n\n    # predict mask by custom method\n\n    ################\n    predict_rle = rle_encode_less_memory(predict_mask) \n    sample_submission.loc[person_idx,'predicted'] = predict_rle\n\n    def img\n    del predict_mask\n    del predict_rle\n    gc.collect()\n\nsample_submission = sample_submission.reset_index()\nsample_submission.to_csv('/kaggle/working/submission.csv',index=False)\nsample_submission.to_csv('submission.csv', index = False)\n</code></pre>\n<p>They said \"Submission CSV Not Found\", So I saved my submission in every prediction moment.</p>\n<pre><code>test_path = '../input/hubmap-kidney-segmentation/test/'\nsample_submission = pd.read_csv('../input/hubmap-kidney-segmentation/sample_submission.csv')\nsample_submission = sample_submission.set_index('id')\ntest_files = sample_submission.index.tolist()\n\nfor step, person_idx in enumerate(test_files):\n\n    print(f'load {step+1}/{len(test_files)} data...')\n    img = tiff.imread(test_path + person_idx + '.tiff').squeeze()\n    if img.shape[0] == 3:\n        img = img.transpose(1,2,0)\n\n    ################\n\n    # predict mask by custom method\n\n    ################\n    predict_rle = rle_encode_less_memory(predict_mask) \n    sample_submission.loc[person_idx,'predicted'] = predict_rle\n\n    def img\n    del predict_mask\n    del predict_rle\n    gc.collect()\n    sample_submission.reset_index().to_csv('/kaggle/working/submission.csv',index=False)\n    sample_submission.reset_index().to_csv('submission.csv', index = False)\n\nsample_submission = sample_submission.reset_index()\nsample_submission.to_csv('/kaggle/working/submission.csv',index=False)\nsample_submission.to_csv('submission.csv', index = False)\n</code></pre>\n<p>Suprisingly, the code above returned the submission score!</p>\n<p>We hope you can use this code to reduce stress and focus on algorithm development.</p>\n<p>and that Kaggle officials also refer to this method to find the cause of the problem. </p>\n<p>:)</p>",
  "messages": [
    {
      "id": 1251859,
      "postDate": "2021-03-25T07:51:17.677Z",
      "content": "<p>Hello!</p>\n<p>When We submitted custom way, we could not get the score.  </p>\n<p>Our code does not use more than 7 GB memory while the notebook is running.   </p>\n<p>Even the code is successfully committed.  </p>\n<p>But we got a only message \"Submission CSV Not Found\".  </p>\n<pre><code>test_path = '../input/hubmap-kidney-segmentation/test/'\nsample_submission = pd.read_csv('../input/hubmap-kidney-segmentation/sample_submission.csv')\nsample_submission = sample_submission.set_index('id')\ntest_files = sample_submission.index.tolist()\n\nfor step, person_idx in enumerate(test_files):\n\n    print(f'load {step+1}/{len(test_files)} data...')\n    img = tiff.imread(test_path + person_idx + '.tiff').squeeze()\n    if img.shape[0] == 3:\n        img = img.transpose(1,2,0)\n\n    ################\n\n    # predict mask by custom method\n\n    ################\n    predict_rle = rle_encode_less_memory(predict_mask) \n    sample_submission.loc[person_idx,'predicted'] = predict_rle\n\n    def img\n    del predict_mask\n    del predict_rle\n    gc.collect()\n\nsample_submission = sample_submission.reset_index()\nsample_submission.to_csv('/kaggle/working/submission.csv',index=False)\nsample_submission.to_csv('submission.csv', index = False)\n</code></pre>\n<p>They said \"Submission CSV Not Found\", So I saved my submission in every prediction moment.</p>\n<pre><code>test_path = '../input/hubmap-kidney-segmentation/test/'\nsample_submission = pd.read_csv('../input/hubmap-kidney-segmentation/sample_submission.csv')\nsample_submission = sample_submission.set_index('id')\ntest_files = sample_submission.index.tolist()\n\nfor step, person_idx in enumerate(test_files):\n\n    print(f'load {step+1}/{len(test_files)} data...')\n    img = tiff.imread(test_path + person_idx + '.tiff').squeeze()\n    if img.shape[0] == 3:\n        img = img.transpose(1,2,0)\n\n    ################\n\n    # predict mask by custom method\n\n    ################\n    predict_rle = rle_encode_less_memory(predict_mask) \n    sample_submission.loc[person_idx,'predicted'] = predict_rle\n\n    def img\n    del predict_mask\n    del predict_rle\n    gc.collect()\n    sample_submission.reset_index().to_csv('/kaggle/working/submission.csv',index=False)\n    sample_submission.reset_index().to_csv('submission.csv', index = False)\n\nsample_submission = sample_submission.reset_index()\nsample_submission.to_csv('/kaggle/working/submission.csv',index=False)\nsample_submission.to_csv('submission.csv', index = False)\n</code></pre>\n<p>Suprisingly, the code above returned the submission score!</p>\n<p>We hope you can use this code to reduce stress and focus on algorithm development.</p>\n<p>and that Kaggle officials also refer to this method to find the cause of the problem. </p>\n<p>:)</p>",
      "rawMarkdown": "Hello!\n\nWhen We submitted custom way, we could not get the score.  \n\nOur code does not use more than 7 GB memory while the notebook is running.   \n\nEven the code is successfully committed.  \n\nBut we got a only message \"Submission CSV Not Found\".  \n\n```\ntest_path = '../input/hubmap-kidney-segmentation/test/'\nsample_submission = pd.read_csv('../input/hubmap-kidney-segmentation/sample_submission.csv')\nsample_submission = sample_submission.set_index('id')\ntest_files = sample_submission.index.tolist()\n\nfor step, person_idx in enumerate(test_files):\n\n    print(f'load {step+1}/{len(test_files)} data...')\n    img = tiff.imread(test_path + person_idx + '.tiff').squeeze()\n    if img.shape[0] == 3:\n        img = img.transpose(1,2,0)\n        \n    ################\n    \n    # predict mask by custom method\n    \n    ################\n    predict_rle = rle_encode_less_memory(predict_mask) \n    sample_submission.loc[person_idx,'predicted'] = predict_rle\n\n    def img\n    del predict_mask\n    del predict_rle\n    gc.collect()\n\nsample_submission = sample_submission.reset_index()\nsample_submission.to_csv('/kaggle/working/submission.csv',index=False)\nsample_submission.to_csv('submission.csv', index = False)\n```\n\n\nThey said \"Submission CSV Not Found\", So I saved my submission in every prediction moment.\n\n```\ntest_path = '../input/hubmap-kidney-segmentation/test/'\nsample_submission = pd.read_csv('../input/hubmap-kidney-segmentation/sample_submission.csv')\nsample_submission = sample_submission.set_index('id')\ntest_files = sample_submission.index.tolist()\n\nfor step, person_idx in enumerate(test_files):\n\n    print(f'load {step+1}/{len(test_files)} data...')\n    img = tiff.imread(test_path + person_idx + '.tiff').squeeze()\n    if img.shape[0] == 3:\n        img = img.transpose(1,2,0)\n        \n    ################\n    \n    # predict mask by custom method\n    \n    ################\n    predict_rle = rle_encode_less_memory(predict_mask) \n    sample_submission.loc[person_idx,'predicted'] = predict_rle\n\n    def img\n    del predict_mask\n    del predict_rle\n    gc.collect()\n    sample_submission.reset_index().to_csv('/kaggle/working/submission.csv',index=False)\n    sample_submission.reset_index().to_csv('submission.csv', index = False)\n\nsample_submission = sample_submission.reset_index()\nsample_submission.to_csv('/kaggle/working/submission.csv',index=False)\nsample_submission.to_csv('submission.csv', index = False)\n```\n\n\nSuprisingly, the code above returned the submission score!\n\nWe hope you can use this code to reduce stress and focus on algorithm development.\n\nand that Kaggle officials also refer to this method to find the cause of the problem. \n\n:)",
      "votes": 5
    },
    {
      "id": 1253676,
      "postDate": "2021-03-26T23:46:50.430Z",
      "content": "<p>I have used 5 submissions today. The code runs successfully every time and creates the submission.csv file. But stupid Kaggle still says says “pending” and “Submission CSV file not found” and “ Our workers are spending a little extra time on your submission. Grab a coffee and refresh later to see your score.”</p>\n<p>My code also never uses more than 9GB of RAM and the public test run finishes in 44 minutes.</p>",
      "rawMarkdown": "I have used 5 submissions today. The code runs successfully every time and creates the submission.csv file. But stupid Kaggle still says says “pending” and “Submission CSV file not found” and “ Our workers are spending a little extra time on your submission. Grab a coffee and refresh later to see your score.”\n\nMy code also never uses more than 9GB of RAM and the public test run finishes in 44 minutes.",
      "votes": 1,
      "replies": [
        {
          "id": 1253951,
          "postDate": "2021-03-27T07:43:02.897Z",
          "content": "<p>If more than one of the unseen test images are enormously larger than the seen, our notebook may be shut down. I guess the kaggle's evaluation system, they can't catch that our notebook is shut down for out of memory. (only waiting for csv to return)<br>\nSo if you save sample submission in every prediction moment, you can get public score. However, This method also won't give you the final private result. we have to find new method to deal with too large images.</p>",
          "rawMarkdown": " If more than one of the unseen test images are enormously larger than the seen, our notebook may be shut down. I guess the kaggle's evaluation system, they can't catch that our notebook is shut down for out of memory. (only waiting for csv to return)\n\n So if you save sample submission in every prediction moment, you can get public score. However, This method also won't give you the final private result. we have to find new method to deal with too large images.",
          "votes": 1
        },
        {
          "id": 1253963,
          "postDate": "2021-03-27T07:56:12.760Z",
          "content": "<p>Thank you, that makes sense. I wish Kaggle would return some kind of error message… I wonder how others are dealing with this.</p>",
          "rawMarkdown": "Thank you, that makes sense. I wish Kaggle would return some kind of error message... I wonder how others are dealing with this.",
          "votes": 1
        },
        {
          "id": 1256284,
          "postDate": "2021-03-29T18:02:33.030Z",
          "content": "<p>I was able to succeed changing tifffile lib to rasterio lib (not changing anything else)</p>",
          "rawMarkdown": "I was able to succeed changing tifffile lib to rasterio lib (not changing anything else)",
          "votes": 2
        },
        {
          "id": 1256502,
          "postDate": "2021-03-30T00:06:43.490Z",
          "rawMarkdown": "",
          "isDeleted": true
        },
        {
          "id": 1265566,
          "postDate": "2021-04-07T03:11:28.740Z",
          "content": "<p><a href=\"https://www.kaggle.com/curiosity806\" target=\"_blank\">@curiosity806</a> i too find same issue . Is it because of oom ,during test run i have been clearing ram , it dsnt takes more than 4.9 gb so even if tiff is huge there is still a buffer </p>",
          "rawMarkdown": "@curiosity806 i too find same issue . Is it because of oom ,during test run i have been clearing ram , it dsnt takes more than 4.9 gb so even if tiff is huge there is still a buffer ",
          "votes": 1
        }
      ]
    },
    {
      "id": 1253478,
      "postDate": "2021-03-26T19:13:28.247Z",
      "content": "<p>Same happening to my submission. Commit runs successfully but submission shows \"Submission CSV Not Found\".</p>\n<p>I've forgotten to include <code>import imagecodecs</code> in my inference notebook. Mayby the hidden set contains both kind of images. </p>\n<p>I just commited. Will see if it works in a couple of hours when computations are over. I'll give feedback here. </p>",
      "rawMarkdown": "Same happening to my submission. Commit runs successfully but submission shows \"Submission CSV Not Found\".\n\nI've forgotten to include `import imagecodecs` in my inference notebook. Mayby the hidden set contains both kind of images. \n\nI just commited. Will see if it works in a couple of hours when computations are over. I'll give feedback here. ",
      "votes": 1,
      "replies": [
        {
          "id": 1253954,
          "postDate": "2021-03-27T07:44:52.587Z",
          "content": "<p>Can it solve this problem? I will try too! thank you.</p>",
          "rawMarkdown": "Can it solve this problem? I will try too! thank you."
        },
        {
          "id": 1253964,
          "postDate": "2021-03-27T07:59:56.760Z",
          "content": "<p>Unfortunately it didn't solve the issue. <br>\nI also have another bug in one cell (referencing non existing images). I'll remove that and run and wait again…</p>",
          "rawMarkdown": "Unfortunately it didn't solve the issue. \nI also have another bug in one cell (referencing non existing images). I'll remove that and run and wait again..."
        }
      ]
    },
    {
      "id": 1287942,
      "postDate": "2021-04-29T14:47:58.920Z",
      "rawMarkdown": "",
      "isDeleted": true
    },
    {
      "id": 1254124,
      "postDate": "2021-03-27T11:15:47.073Z",
      "rawMarkdown": "",
      "isDeleted": true
    },
    {
      "id": 1269083,
      "postDate": "2021-04-10T06:16:37.687Z",
      "content": "<p>great!<br>\nthank you for sharing</p>",
      "rawMarkdown": "great!\nthank you for sharing"
    }
  ],
  "comments": [
    {
      "id": 1253676,
      "author_name": "Erik Dali",
      "author_url": "",
      "post_date": "2021-03-26T23:46:50.430000",
      "content": "<p>I have used 5 submissions today. The code runs successfully every time and creates the submission.csv file. But stupid Kaggle still says says “pending” and “Submission CSV file not found” and “ Our workers are spending a little extra time on your submission. Grab a coffee and refresh later to see your score.”</p>\n<p>My code also never uses more than 9GB of RAM and the public test run finishes in 44 minutes.</p>",
      "votes": 1,
      "replies": [
        {
          "id": 1253951,
          "author_name": "Daegwon B",
          "author_url": "",
          "post_date": "2021-03-27T07:43:02.897000",
          "content": "<p>If more than one of the unseen test images are enormously larger than the seen, our notebook may be shut down. I guess the kaggle's evaluation system, they can't catch that our notebook is shut down for out of memory. (only waiting for csv to return)<br>\nSo if you save sample submission in every prediction moment, you can get public score. However, This method also won't give you the final private result. we have to find new method to deal with too large images.</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1253963,
          "author_name": "Erik Dali",
          "author_url": "",
          "post_date": "2021-03-27T07:56:12.760000",
          "content": "<p>Thank you, that makes sense. I wish Kaggle would return some kind of error message… I wonder how others are dealing with this.</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1256284,
          "author_name": "João Pedro Mazuco Rodriguez",
          "author_url": "",
          "post_date": "2021-03-29T18:02:33.030000",
          "content": "<p>I was able to succeed changing tifffile lib to rasterio lib (not changing anything else)</p>",
          "votes": 2,
          "replies": []
        },
        {
          "id": 1256502,
          "author_name": "",
          "author_url": "",
          "post_date": "2021-03-30T00:06:43.490000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1265566,
          "author_name": "Jaideep",
          "author_url": "",
          "post_date": "2021-04-07T03:11:28.740000",
          "content": "<p><a href=\"https://www.kaggle.com/curiosity806\" target=\"_blank\">@curiosity806</a> i too find same issue . Is it because of oom ,during test run i have been clearing ram , it dsnt takes more than 4.9 gb so even if tiff is huge there is still a buffer </p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 1253478,
      "author_name": "Jo Tom",
      "author_url": "",
      "post_date": "2021-03-26T19:13:28.247000",
      "content": "<p>Same happening to my submission. Commit runs successfully but submission shows \"Submission CSV Not Found\".</p>\n<p>I've forgotten to include <code>import imagecodecs</code> in my inference notebook. Mayby the hidden set contains both kind of images. </p>\n<p>I just commited. Will see if it works in a couple of hours when computations are over. I'll give feedback here. </p>",
      "votes": 1,
      "replies": [
        {
          "id": 1253954,
          "author_name": "Daegwon B",
          "author_url": "",
          "post_date": "2021-03-27T07:44:52.587000",
          "content": "<p>Can it solve this problem? I will try too! thank you.</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1253964,
          "author_name": "Jo Tom",
          "author_url": "",
          "post_date": "2021-03-27T07:59:56.760000",
          "content": "<p>Unfortunately it didn't solve the issue. <br>\nI also have another bug in one cell (referencing non existing images). I'll remove that and run and wait again…</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1287942,
      "author_name": "",
      "author_url": "",
      "post_date": "2021-04-29T14:47:58.920000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1254124,
      "author_name": "",
      "author_url": "",
      "post_date": "2021-03-27T11:15:47.073000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1269083,
      "author_name": "yoouza",
      "author_url": "",
      "post_date": "2021-04-10T06:16:37.687000",
      "content": "<p>great!<br>\nthank you for sharing</p>",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1251859": "Hello!\n\nWhen We submitted custom way, we could not get the score.  \n\nOur code does not use more than 7 GB memory while the notebook is running.   \n\nEven the code is successfully committed.  \n\nBut we got a only message \"Submission CSV Not Found\".  \n\n```\ntest_path = '../input/hubmap-kidney-segmentation/test/'\nsample_submission = pd.read_csv('../input/hubmap-kidney-segmentation/sample_submission.csv')\nsample_submission = sample_submission.set_index('id')\ntest_files = sample_submission.index.tolist()\n\nfor step, person_idx in enumerate(test_files):\n\n    print(f'load {step+1}/{len(test_files)} data...')\n    img = tiff.imread(test_path + person_idx + '.tiff').squeeze()\n    if img.shape[0] == 3:\n        img = img.transpose(1,2,0)\n        \n    ################\n    \n    # predict mask by custom method\n    \n    ################\n    predict_rle = rle_encode_less_memory(predict_mask) \n    sample_submission.loc[person_idx,'predicted'] = predict_rle\n\n    def img\n    del predict_mask\n    del predict_rle\n    gc.collect()\n\nsample_submission = sample_submission.reset_index()\nsample_submission.to_csv('/kaggle/working/submission.csv',index=False)\nsample_submission.to_csv('submission.csv', index = False)\n```\n\n\nThey said \"Submission CSV Not Found\", So I saved my submission in every prediction moment.\n\n```\ntest_path = '../input/hubmap-kidney-segmentation/test/'\nsample_submission = pd.read_csv('../input/hubmap-kidney-segmentation/sample_submission.csv')\nsample_submission = sample_submission.set_index('id')\ntest_files = sample_submission.index.tolist()\n\nfor step, person_idx in enumerate(test_files):\n\n    print(f'load {step+1}/{len(test_files)} data...')\n    img = tiff.imread(test_path + person_idx + '.tiff').squeeze()\n    if img.shape[0] == 3:\n        img = img.transpose(1,2,0)\n        \n    ################\n    \n    # predict mask by custom method\n    \n    ################\n    predict_rle = rle_encode_less_memory(predict_mask) \n    sample_submission.loc[person_idx,'predicted'] = predict_rle\n\n    def img\n    del predict_mask\n    del predict_rle\n    gc.collect()\n    sample_submission.reset_index().to_csv('/kaggle/working/submission.csv',index=False)\n    sample_submission.reset_index().to_csv('submission.csv', index = False)\n\nsample_submission = sample_submission.reset_index()\nsample_submission.to_csv('/kaggle/working/submission.csv',index=False)\nsample_submission.to_csv('submission.csv', index = False)\n```\n\n\nSuprisingly, the code above returned the submission score!\n\nWe hope you can use this code to reduce stress and focus on algorithm development.\n\nand that Kaggle officials also refer to this method to find the cause of the problem. \n\n:)",
    "1253676": "I have used 5 submissions today. The code runs successfully every time and creates the submission.csv file. But stupid Kaggle still says says “pending” and “Submission CSV file not found” and “ Our workers are spending a little extra time on your submission. Grab a coffee and refresh later to see your score.”\n\nMy code also never uses more than 9GB of RAM and the public test run finishes in 44 minutes.",
    "1253478": "Same happening to my submission. Commit runs successfully but submission shows \"Submission CSV Not Found\".\n\nI've forgotten to include `import imagecodecs` in my inference notebook. Mayby the hidden set contains both kind of images. \n\nI just commited. Will see if it works in a couple of hours when computations are over. I'll give feedback here. ",
    "1287942": "",
    "1254124": "",
    "1269083": "great!\nthank you for sharing"
  }
}