{
  "id": 269592,
  "title": "Notebook Threw Exception",
  "url": "/competitions/landmark-retrieval-2021/discussion/269592",
  "author_name": "",
  "post_date": "2021-09-01T09:44:00.877576500Z",
  "votes": null,
  "comment_count": 3,
  "views": 0,
  "content": "<p>My notebook runs without any problems and generates a output file without any issues, however when I try to make a submission, I get this error :</p>\n<p>Status: Notebook Threw Exception<br>\nPublic Score: Error </p>\n<p>The pop up shows \"no additional details provided about this error</p>\n<p>Any help is appreciacted.</p>",
  "messages": [
    {
      "id": "1498896",
      "postDate": "09/01/2021 09:44:00",
      "content": "<p>My notebook runs without any problems and generates a output file without any issues, however when I try to make a submission, I get this error :</p>\n<p>Status: Notebook Threw Exception<br>\nPublic Score: Error </p>\n<p>The pop up shows \"no additional details provided about this error</p>\n<p>Any help is appreciacted.</p>",
      "rawMarkdown": "My notebook runs without any problems and generates a output file without any issues, however when I try to make a submission, I get this error :\n\nStatus: Notebook Threw Exception\nPublic Score: Error \n\nThe pop up shows \"no additional details provided about this error\n\nAny help is appreciacted.",
      "votes": null
    },
    {
      "id": "1498903",
      "postDate": "09/01/2021 09:53:06",
      "content": "<p>Bunch of things could be happening here. If you are using some of publicly available notebooks, you may have noticed that for the run when you commit the code i.e. for the visible test set it simply copies the sample submission. See the example given below<br>\n<code>if len(test_image_list)==1129:\n        sub_df = pd.read_csv('../input/landmark-retrieval-2021/sample_submission.csv')\n        sub_df.to_csv('submission.csv', index=False)\n        return</code><br>\nThus in this case even if your code runs fine and if there are some issues in the other functions you may have added/modified in those notebooks,   you wouldn't know the issue after submission. Maybe some functions right at the end of the code are causing an issue.</p>\n<p>The best approach would be to unit testing of each function in manual run (be it public notebook edits or your own custom code that you have written) and after that maybe run it on smaller sub folders of test and train set to see if it passes a successful submission. </p>\n<p>Hope this helps 👍</p>",
      "rawMarkdown": "Bunch of things could be happening here. If you are using some of publicly available notebooks, you may have noticed that for the run when you commit the code i.e. for the visible test set it simply copies the sample submission. See the example given below\n`if len(test_image_list)==1129:\n        sub_df = pd.read_csv('../input/landmark-retrieval-2021/sample_submission.csv')\n        sub_df.to_csv('submission.csv', index=False)\n        return`\nThus in this case even if your code runs fine and if there are some issues in the other functions you may have added/modified in those notebooks,   you wouldn't know the issue after submission. Maybe some functions right at the end of the code are causing an issue.\n\nThe best approach would be to unit testing of each function in manual run (be it public notebook edits or your own custom code that you have written) and after that maybe run it on smaller sub folders of test and train set to see if it passes a successful submission. \n\nHope this helps 👍",
      "votes": null
    },
    {
      "id": "1498921",
      "postDate": "09/01/2021 10:06:58",
      "content": "<p>I used a custom notebook for training and then saved the model. Later I am importing the model to another notebook to make the submission. I am prediicting all the visible test cases too, and at that stage it works fine, its only when I make a submission, it gives me the error. </p>\n<p>Anyways, thanks for the help, I will try to unit test my code and see if that works.</p>",
      "rawMarkdown": "I used a custom notebook for training and then saved the model. Later I am importing the model to another notebook to make the submission. I am prediicting all the visible test cases too, and at that stage it works fine, its only when I make a submission, it gives me the error. \n\nAnyways, thanks for the help, I will try to unit test my code and see if that works.",
      "votes": null
    },
    {
      "id": "1498925",
      "postDate": "09/01/2021 10:14:00",
      "content": "<p>Ok, i see…maybe in that case your code is missing some edge case which is throwing exception when running on full test set. Unit test will definitely give you the cause.<br>\nGood luck for the rest of the competition ✌️</p>",
      "rawMarkdown": "Ok, i see...maybe in that case your code is missing some edge case which is throwing exception when running on full test set. Unit test will definitely give you the cause.\nGood luck for the rest of the competition ✌️",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1498903,
      "author_name": "sandy1112",
      "author_url": "",
      "post_date": "09/01/2021 09:53:06",
      "content": "<p>Bunch of things could be happening here. If you are using some of publicly available notebooks, you may have noticed that for the run when you commit the code i.e. for the visible test set it simply copies the sample submission. See the example given below<br>\n<code>if len(test_image_list)==1129:\n        sub_df = pd.read_csv('../input/landmark-retrieval-2021/sample_submission.csv')\n        sub_df.to_csv('submission.csv', index=False)\n        return</code><br>\nThus in this case even if your code runs fine and if there are some issues in the other functions you may have added/modified in those notebooks,   you wouldn't know the issue after submission. Maybe some functions right at the end of the code are causing an issue.</p>\n<p>The best approach would be to unit testing of each function in manual run (be it public notebook edits or your own custom code that you have written) and after that maybe run it on smaller sub folders of test and train set to see if it passes a successful submission. </p>\n<p>Hope this helps 👍</p>",
      "votes": null,
      "replies": [
        {
          "id": 1498921,
          "author_name": "prajwalsood",
          "author_url": "",
          "post_date": "09/01/2021 10:06:58",
          "content": "<p>I used a custom notebook for training and then saved the model. Later I am importing the model to another notebook to make the submission. I am prediicting all the visible test cases too, and at that stage it works fine, its only when I make a submission, it gives me the error. </p>\n<p>Anyways, thanks for the help, I will try to unit test my code and see if that works.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1498925,
          "author_name": "sandy1112",
          "author_url": "",
          "post_date": "09/01/2021 10:14:00",
          "content": "<p>Ok, i see…maybe in that case your code is missing some edge case which is throwing exception when running on full test set. Unit test will definitely give you the cause.<br>\nGood luck for the rest of the competition ✌️</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1498896": "My notebook runs without any problems and generates a output file without any issues, however when I try to make a submission, I get this error :\n\nStatus: Notebook Threw Exception\nPublic Score: Error \n\nThe pop up shows \"no additional details provided about this error\n\nAny help is appreciacted.",
    "1498903": "Bunch of things could be happening here. If you are using some of publicly available notebooks, you may have noticed that for the run when you commit the code i.e. for the visible test set it simply copies the sample submission. See the example given below\n`if len(test_image_list)==1129:\n        sub_df = pd.read_csv('../input/landmark-retrieval-2021/sample_submission.csv')\n        sub_df.to_csv('submission.csv', index=False)\n        return`\nThus in this case even if your code runs fine and if there are some issues in the other functions you may have added/modified in those notebooks,   you wouldn't know the issue after submission. Maybe some functions right at the end of the code are causing an issue.\n\nThe best approach would be to unit testing of each function in manual run (be it public notebook edits or your own custom code that you have written) and after that maybe run it on smaller sub folders of test and train set to see if it passes a successful submission. \n\nHope this helps 👍",
    "1498921": "I used a custom notebook for training and then saved the model. Later I am importing the model to another notebook to make the submission. I am prediicting all the visible test cases too, and at that stage it works fine, its only when I make a submission, it gives me the error. \n\nAnyways, thanks for the help, I will try to unit test my code and see if that works.",
    "1498925": "Ok, i see...maybe in that case your code is missing some edge case which is throwing exception when running on full test set. Unit test will definitely give you the cause.\nGood luck for the rest of the competition ✌️"
  },
  "source": "meta"
}