{
  "id": 416613,
  "title": "Help with Notebook Threw Exception",
  "url": "/competitions/hubmap-hacking-the-human-vasculature/discussion/416613",
  "author_name": "",
  "post_date": "2023-06-12T10:48:30.716323500Z",
  "votes": 2,
  "comment_count": 17,
  "views": 0,
  "content": "<p>Hi!</p>\n<p>I have a problem with my submission but I cannot find the solution. When I submit this notebook <a href=\"https://www.kaggle.com/code/robertsun2/unet-hubmap?scriptVersionId=132922144\" target=\"_blank\">https://www.kaggle.com/code/robertsun2/unet-hubmap?scriptVersionId=132922144</a>, I get Notebook Threw Exception even the notebook has completed the run succesfully. </p>\n<p>The explanation is maybe there is an issue with the private test dataset. I have run my code with more images in the test dataset (taking them from the train folder) and it works fine. I get a submission table with many rows and they are in the same format that is explained in the \"Evaluation\" section.</p>\n<p>I don't know what happens and it is being very difficult for me to solve this problem. Could anyone help me, please? Thank you!</p>",
  "messages": [
    {
      "id": "2297061",
      "postDate": "06/12/2023 10:48:30",
      "content": "<p>Hi!</p>\n<p>I have a problem with my submission but I cannot find the solution. When I submit this notebook <a href=\"https://www.kaggle.com/code/robertsun2/unet-hubmap?scriptVersionId=132922144\" target=\"_blank\">https://www.kaggle.com/code/robertsun2/unet-hubmap?scriptVersionId=132922144</a>, I get Notebook Threw Exception even the notebook has completed the run succesfully. </p>\n<p>The explanation is maybe there is an issue with the private test dataset. I have run my code with more images in the test dataset (taking them from the train folder) and it works fine. I get a submission table with many rows and they are in the same format that is explained in the \"Evaluation\" section.</p>\n<p>I don't know what happens and it is being very difficult for me to solve this problem. Could anyone help me, please? Thank you!</p>",
      "rawMarkdown": "Hi!\n\nI have a problem with my submission but I cannot find the solution. When I submit this notebook https://www.kaggle.com/code/robertsun2/unet-hubmap?scriptVersionId=132922144, I get Notebook Threw Exception even the notebook has completed the run succesfully. \n\nThe explanation is maybe there is an issue with the private test dataset. I have run my code with more images in the test dataset (taking them from the train folder) and it works fine. I get a submission table with many rows and they are in the same format that is explained in the \"Evaluation\" section.\n\nI don't know what happens and it is being very difficult for me to solve this problem. Could anyone help me, please? Thank you!",
      "votes": null
    },
    {
      "id": "2297723",
      "postDate": "06/12/2023 18:54:27",
      "content": "<p>Hi, the line is not working</p>",
      "rawMarkdown": "Hi, the line is not working",
      "votes": null
    },
    {
      "id": "2297760",
      "postDate": "06/12/2023 19:30:24",
      "content": "<p>Hey, sorry, what line?</p>",
      "rawMarkdown": "Hey, sorry, what line?",
      "votes": null
    },
    {
      "id": "2297762",
      "postDate": "06/12/2023 19:35:30",
      "content": "<p>Sorry I meant the link is not working </p>",
      "rawMarkdown": "Sorry I meant the link is not working",
      "votes": null
    },
    {
      "id": "2298826",
      "postDate": "06/12/2023 20:51:14",
      "content": "<p>What do you see when you click the link? I think the notebook is public</p>",
      "rawMarkdown": "What do you see when you click the link? I think the notebook is public",
      "votes": null
    },
    {
      "id": "2300132",
      "postDate": "06/13/2023 03:37:12",
      "content": "<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3951798%2F1bc68b5ad3b82ac1ded819efa99994af%2FScreenshot%202023-06-13%20090245.png?generation=1686627429628929&amp;alt=media\" alt=\"\"></p>",
      "rawMarkdown": "![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3951798%2F1bc68b5ad3b82ac1ded819efa99994af%2FScreenshot%202023-06-13%20090245.png?generation=1686627429628929&alt=media)",
      "votes": null
    },
    {
      "id": "2300293",
      "postDate": "06/13/2023 05:52:27",
      "content": "<p>Try now, please</p>",
      "rawMarkdown": "Try now, please",
      "votes": null
    },
    {
      "id": "2300402",
      "postDate": "06/13/2023 07:25:13",
      "content": "<p>have you tried this ? </p>\n<p>submission_table.to_csv('submission.csv', <strong>index= False</strong>)</p>",
      "rawMarkdown": "have you tried this ? \n\nsubmission_table.to_csv('submission.csv', **index= False**)",
      "votes": null
    },
    {
      "id": "2300409",
      "postDate": "06/13/2023 07:27:26",
      "content": "<p>Also you are supposed to encode each object mask separately. If there are three blood_vessels, each string should contain encoding of only one such instance. So your output should look something like this: \"0 1.0 adsasdad== 0 1.0 asdadasdasXD 0 1.0 adsadsasd==\"</p>",
      "rawMarkdown": "Also you are supposed to encode each object mask separately. If there are three blood_vessels, each string should contain encoding of only one such instance. So your output should look something like this: \"0 1.0 adsasdad== 0 1.0 asdadasdasXD 0 1.0 adsadsasd==\"",
      "votes": null
    },
    {
      "id": "2300427",
      "postDate": "06/13/2023 07:41:57",
      "content": "<p>Really? I read in \"Evaluation\" section the following:<br>\n\"Separate prediction strings multiple instance masks for the same image with a space, like so:\"</p>\n<p>I think you have to put one string per a whole mask, not for every blood_vessel in the image.</p>\n<p>I will try \"index=False\" as you say</p>",
      "rawMarkdown": "Really? I read in \"Evaluation\" section the following:\n\"Separate prediction strings multiple instance masks for the same image with a space, like so:\"\n\nI think you have to put one string per a whole mask, not for every blood_vessel in the image.\n\nI will try \"index=False\" as you say",
      "votes": null
    },
    {
      "id": "2300490",
      "postDate": "06/13/2023 08:14:55",
      "content": "<p>What I meant was you need one single row entry for every image, but the encoded string should have separate strings for each individual blood-vessel rather than a single encoded string with single confidence score. </p>",
      "rawMarkdown": "What I meant was you need one single row entry for every image, but the encoded string should have separate strings for each individual blood-vessel rather than a single encoded string with single confidence score.",
      "votes": null
    },
    {
      "id": "2301740",
      "postDate": "06/14/2023 06:23:56",
      "content": "<p>That is the thing I am telling you I am not sure. Because I think we should have separate strings for each \"alternative\" estimation of the mask. I mean, we can predict one possible mask with one specific confidence, another alternative mask with another confidence, etc. It is not for every individual blood-vessel, it is for every alternative prediction of the same image. I think that. Don't you?</p>",
      "rawMarkdown": "That is the thing I am telling you I am not sure. Because I think we should have separate strings for each \"alternative\" estimation of the mask. I mean, we can predict one possible mask with one specific confidence, another alternative mask with another confidence, etc. It is not for every individual blood-vessel, it is for every alternative prediction of the same image. I think that. Don't you?",
      "votes": null
    },
    {
      "id": "2303966",
      "postDate": "06/15/2023 15:31:30",
      "content": "<p>Was the issue resolved for you roberto?</p>",
      "rawMarkdown": "Was the issue resolved for you roberto?",
      "votes": null
    },
    {
      "id": "2304085",
      "postDate": "06/15/2023 17:04:30",
      "content": "<p>I have a generic answer which worked for me when I faced a similar issue. I went through my notebook and removed everything but the inference part. I also removed any visualisation or output for debugging purposes. With this it was simpler to identify what could go wrong. Your notebook is doing training as well as inference. Might be worth simplifying so you're just doing inference with a saved pre-trained model. </p>",
      "rawMarkdown": "I have a generic answer which worked for me when I faced a similar issue. I went through my notebook and removed everything but the inference part. I also removed any visualisation or output for debugging purposes. With this it was simpler to identify what could go wrong. Your notebook is doing training as well as inference. Might be worth simplifying so you're just doing inference with a saved pre-trained model.",
      "votes": null
    },
    {
      "id": "2308816",
      "postDate": "06/19/2023 08:28:54",
      "content": "<p>Sorry for my late reply. I am going to try the solution of Culture and I will tell you how it was</p>",
      "rawMarkdown": "Sorry for my late reply. I am going to try the solution of Culture and I will tell you how it was",
      "votes": null
    },
    {
      "id": "2308817",
      "postDate": "06/19/2023 08:29:52",
      "content": "<p>Okay! I will extract the inference part and I will only use the pre-trained model. I will tell you how it was. Thanks!</p>",
      "rawMarkdown": "Okay! I will extract the inference part and I will only use the pre-trained model. I will tell you how it was. Thanks!",
      "votes": null
    },
    {
      "id": "2310302",
      "postDate": "06/20/2023 09:08:47",
      "content": "<p>What I have observed is that the hidden test set contains multiple images and due to this I was facing this issue of running out of GPU memory, Then i deleted the tensors in the GPU and freed the memory to make the submission work</p>",
      "rawMarkdown": "What I have observed is that the hidden test set contains multiple images and due to this I was facing this issue of running out of GPU memory, Then i deleted the tensors in the GPU and freed the memory to make the submission work",
      "votes": null
    },
    {
      "id": "2319575",
      "postDate": "06/27/2023 07:59:57",
      "content": "<p>I separated the inference from the training part. It works!</p>",
      "rawMarkdown": "I separated the inference from the training part. It works!",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 2297723,
      "author_name": "dhruvkhatri",
      "author_url": "",
      "post_date": "06/12/2023 18:54:27",
      "content": "<p>Hi, the line is not working</p>",
      "votes": null,
      "replies": [
        {
          "id": 2297760,
          "author_name": "robertsun2",
          "author_url": "",
          "post_date": "06/12/2023 19:30:24",
          "content": "<p>Hey, sorry, what line?</p>",
          "votes": null,
          "replies": [
            {
              "id": 2297762,
              "author_name": "dhruvkhatri",
              "author_url": "",
              "post_date": "06/12/2023 19:35:30",
              "content": "<p>Sorry I meant the link is not working </p>",
              "votes": null,
              "replies": [
                {
                  "id": 2298826,
                  "author_name": "robertsun2",
                  "author_url": "",
                  "post_date": "06/12/2023 20:51:14",
                  "content": "<p>What do you see when you click the link? I think the notebook is public</p>",
                  "votes": null,
                  "replies": [
                    {
                      "id": 2300132,
                      "author_name": "dhruvkhatri",
                      "author_url": "",
                      "post_date": "06/13/2023 03:37:12",
                      "content": "<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3951798%2F1bc68b5ad3b82ac1ded819efa99994af%2FScreenshot%202023-06-13%20090245.png?generation=1686627429628929&amp;alt=media\" alt=\"\"></p>",
                      "votes": null,
                      "replies": [
                        {
                          "id": 2300293,
                          "author_name": "robertsun2",
                          "author_url": "",
                          "post_date": "06/13/2023 05:52:27",
                          "content": "<p>Try now, please</p>",
                          "votes": null,
                          "replies": [
                            {
                              "id": 2300402,
                              "author_name": "dhruvkhatri",
                              "author_url": "",
                              "post_date": "06/13/2023 07:25:13",
                              "content": "<p>have you tried this ? </p>\n<p>submission_table.to_csv('submission.csv', <strong>index= False</strong>)</p>",
                              "votes": null,
                              "replies": [
                                {
                                  "id": 2300409,
                                  "author_name": "dhruvkhatri",
                                  "author_url": "",
                                  "post_date": "06/13/2023 07:27:26",
                                  "content": "<p>Also you are supposed to encode each object mask separately. If there are three blood_vessels, each string should contain encoding of only one such instance. So your output should look something like this: \"0 1.0 adsasdad== 0 1.0 asdadasdasXD 0 1.0 adsadsasd==\"</p>",
                                  "votes": null,
                                  "replies": [
                                    {
                                      "id": 2300427,
                                      "author_name": "robertsun2",
                                      "author_url": "",
                                      "post_date": "06/13/2023 07:41:57",
                                      "content": "<p>Really? I read in \"Evaluation\" section the following:<br>\n\"Separate prediction strings multiple instance masks for the same image with a space, like so:\"</p>\n<p>I think you have to put one string per a whole mask, not for every blood_vessel in the image.</p>\n<p>I will try \"index=False\" as you say</p>",
                                      "votes": null,
                                      "replies": [
                                        {
                                          "id": 2300490,
                                          "author_name": "dhruvkhatri",
                                          "author_url": "",
                                          "post_date": "06/13/2023 08:14:55",
                                          "content": "<p>What I meant was you need one single row entry for every image, but the encoded string should have separate strings for each individual blood-vessel rather than a single encoded string with single confidence score. </p>",
                                          "votes": null,
                                          "replies": [
                                            {
                                              "id": 2301740,
                                              "author_name": "robertsun2",
                                              "author_url": "",
                                              "post_date": "06/14/2023 06:23:56",
                                              "content": "<p>That is the thing I am telling you I am not sure. Because I think we should have separate strings for each \"alternative\" estimation of the mask. I mean, we can predict one possible mask with one specific confidence, another alternative mask with another confidence, etc. It is not for every individual blood-vessel, it is for every alternative prediction of the same image. I think that. Don't you?</p>",
                                              "votes": null,
                                              "replies": []
                                            }
                                          ]
                                        }
                                      ]
                                    }
                                  ]
                                }
                              ]
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "id": 2303966,
      "author_name": "ramakrishnanna18b030",
      "author_url": "",
      "post_date": "06/15/2023 15:31:30",
      "content": "<p>Was the issue resolved for you roberto?</p>",
      "votes": null,
      "replies": [
        {
          "id": 2308816,
          "author_name": "robertsun2",
          "author_url": "",
          "post_date": "06/19/2023 08:28:54",
          "content": "<p>Sorry for my late reply. I am going to try the solution of Culture and I will tell you how it was</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 2304085,
      "author_name": "achandra1",
      "author_url": "",
      "post_date": "06/15/2023 17:04:30",
      "content": "<p>I have a generic answer which worked for me when I faced a similar issue. I went through my notebook and removed everything but the inference part. I also removed any visualisation or output for debugging purposes. With this it was simpler to identify what could go wrong. Your notebook is doing training as well as inference. Might be worth simplifying so you're just doing inference with a saved pre-trained model. </p>",
      "votes": null,
      "replies": [
        {
          "id": 2308817,
          "author_name": "robertsun2",
          "author_url": "",
          "post_date": "06/19/2023 08:29:52",
          "content": "<p>Okay! I will extract the inference part and I will only use the pre-trained model. I will tell you how it was. Thanks!</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 2310302,
      "author_name": "vishakkbhat",
      "author_url": "",
      "post_date": "06/20/2023 09:08:47",
      "content": "<p>What I have observed is that the hidden test set contains multiple images and due to this I was facing this issue of running out of GPU memory, Then i deleted the tensors in the GPU and freed the memory to make the submission work</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 2319575,
      "author_name": "robertsun2",
      "author_url": "",
      "post_date": "06/27/2023 07:59:57",
      "content": "<p>I separated the inference from the training part. It works!</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "2297061": "Hi!\n\nI have a problem with my submission but I cannot find the solution. When I submit this notebook https://www.kaggle.com/code/robertsun2/unet-hubmap?scriptVersionId=132922144, I get Notebook Threw Exception even the notebook has completed the run succesfully. \n\nThe explanation is maybe there is an issue with the private test dataset. I have run my code with more images in the test dataset (taking them from the train folder) and it works fine. I get a submission table with many rows and they are in the same format that is explained in the \"Evaluation\" section.\n\nI don't know what happens and it is being very difficult for me to solve this problem. Could anyone help me, please? Thank you!",
    "2297723": "Hi, the line is not working",
    "2297760": "Hey, sorry, what line?",
    "2297762": "Sorry I meant the link is not working",
    "2298826": "What do you see when you click the link? I think the notebook is public",
    "2300132": "![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3951798%2F1bc68b5ad3b82ac1ded819efa99994af%2FScreenshot%202023-06-13%20090245.png?generation=1686627429628929&alt=media)",
    "2300293": "Try now, please",
    "2300402": "have you tried this ? \n\nsubmission_table.to_csv('submission.csv', **index= False**)",
    "2300409": "Also you are supposed to encode each object mask separately. If there are three blood_vessels, each string should contain encoding of only one such instance. So your output should look something like this: \"0 1.0 adsasdad== 0 1.0 asdadasdasXD 0 1.0 adsadsasd==\"",
    "2300427": "Really? I read in \"Evaluation\" section the following:\n\"Separate prediction strings multiple instance masks for the same image with a space, like so:\"\n\nI think you have to put one string per a whole mask, not for every blood_vessel in the image.\n\nI will try \"index=False\" as you say",
    "2300490": "What I meant was you need one single row entry for every image, but the encoded string should have separate strings for each individual blood-vessel rather than a single encoded string with single confidence score.",
    "2301740": "That is the thing I am telling you I am not sure. Because I think we should have separate strings for each \"alternative\" estimation of the mask. I mean, we can predict one possible mask with one specific confidence, another alternative mask with another confidence, etc. It is not for every individual blood-vessel, it is for every alternative prediction of the same image. I think that. Don't you?",
    "2303966": "Was the issue resolved for you roberto?",
    "2304085": "I have a generic answer which worked for me when I faced a similar issue. I went through my notebook and removed everything but the inference part. I also removed any visualisation or output for debugging purposes. With this it was simpler to identify what could go wrong. Your notebook is doing training as well as inference. Might be worth simplifying so you're just doing inference with a saved pre-trained model.",
    "2308816": "Sorry for my late reply. I am going to try the solution of Culture and I will tell you how it was",
    "2308817": "Okay! I will extract the inference part and I will only use the pre-trained model. I will tell you how it was. Thanks!",
    "2310302": "What I have observed is that the hidden test set contains multiple images and due to this I was facing this issue of running out of GPU memory, Then i deleted the tensors in the GPU and freed the memory to make the submission work",
    "2319575": "I separated the inference from the training part. It works!"
  },
  "source": "meta"
}