{
  "id": 401518,
  "title": "Submission scoring error",
  "url": "/competitions/vesuvius-challenge-ink-detection/discussion/401518",
  "author_name": "",
  "post_date": "2023-04-13T16:11:28.290132Z",
  "votes": null,
  "comment_count": 4,
  "views": 0,
  "content": "<p>I am modifying the sample notebook and trying to make submissions. The changes mainly include the hyperparameter experiments. But when I submit the notebook, despite the notebook running fine, I get the above error. </p>\n<p>The logs tail as follows:</p>\n<pre><code>4599.6s    16  Wall time: 4min 51s\n4650.0s    17  /opt/conda/lib/python3.7/site-packages/traitlets/traitlets.py:2935: FutureWarning: --Exporter.preprocessors=[\"remove_papermill_header.RemovePapermillHeader\"] for containers is deprecated in traitlets 5.0. You can pass `--Exporter.preprocessors item` ... multiple times to add items to a list.\n4650.0s    18    FutureWarning,\n4650.0s    19  [NbConvertApp] Converting notebook __notebook__.ipynb to notebook\n4673.4s    20  [NbConvertApp] Writing 332315 bytes to __notebook__.ipynb\n4685.7s    21  /opt/conda/lib/python3.7/site-packages/traitlets/traitlets.py:2935: FutureWarning: --Exporter.preprocessors=[\"nbconvert.preprocessors.ExtractOutputPreprocessor\"] for containers is deprecated in traitlets 5.0. You can pass `--Exporter.preprocessors item` ... multiple times to add items to a list.\n4685.7s    22    FutureWarning,\n4685.7s    23  [NbConvertApp] Converting notebook __notebook__.ipynb to html\n4686.9s    24  /opt/conda/lib/python3.7/site-packages/bleach/sanitizer.py:168: NoCssSanitizerWarning: 'style' attribute specified, but css_sanitizer not set.\n4686.9s    25    category=NoCssSanitizerWarning,\n4686.9s    26  [NbConvertApp] Support files will be in __results___files/\n4686.9s    27  [NbConvertApp] Making directory __results___files\n4686.9s    28  [NbConvertApp] Making directory __results___files\n4686.9s    29  [NbConvertApp] Making directory __results___files\n4686.9s    30  [NbConvertApp] Writing 364462 bytes to __results__.html\n</code></pre>\n<p>Also, I suspect that the rle values written to the csv are duplicates (apparently)…</p>\n<p>Has someone experienced this issue? <img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3880742%2F66d1444118f1e0f796d2900185a4e2cf%2Fffe.png?generation=1681402215661324&amp;alt=media\" alt=\"\"></p>",
  "messages": [
    {
      "id": "2220722",
      "postDate": "04/13/2023 16:11:28",
      "content": "<p>I am modifying the sample notebook and trying to make submissions. The changes mainly include the hyperparameter experiments. But when I submit the notebook, despite the notebook running fine, I get the above error. </p>\n<p>The logs tail as follows:</p>\n<pre><code>4599.6s    16  Wall time: 4min 51s\n4650.0s    17  /opt/conda/lib/python3.7/site-packages/traitlets/traitlets.py:2935: FutureWarning: --Exporter.preprocessors=[\"remove_papermill_header.RemovePapermillHeader\"] for containers is deprecated in traitlets 5.0. You can pass `--Exporter.preprocessors item` ... multiple times to add items to a list.\n4650.0s    18    FutureWarning,\n4650.0s    19  [NbConvertApp] Converting notebook __notebook__.ipynb to notebook\n4673.4s    20  [NbConvertApp] Writing 332315 bytes to __notebook__.ipynb\n4685.7s    21  /opt/conda/lib/python3.7/site-packages/traitlets/traitlets.py:2935: FutureWarning: --Exporter.preprocessors=[\"nbconvert.preprocessors.ExtractOutputPreprocessor\"] for containers is deprecated in traitlets 5.0. You can pass `--Exporter.preprocessors item` ... multiple times to add items to a list.\n4685.7s    22    FutureWarning,\n4685.7s    23  [NbConvertApp] Converting notebook __notebook__.ipynb to html\n4686.9s    24  /opt/conda/lib/python3.7/site-packages/bleach/sanitizer.py:168: NoCssSanitizerWarning: 'style' attribute specified, but css_sanitizer not set.\n4686.9s    25    category=NoCssSanitizerWarning,\n4686.9s    26  [NbConvertApp] Support files will be in __results___files/\n4686.9s    27  [NbConvertApp] Making directory __results___files\n4686.9s    28  [NbConvertApp] Making directory __results___files\n4686.9s    29  [NbConvertApp] Making directory __results___files\n4686.9s    30  [NbConvertApp] Writing 364462 bytes to __results__.html\n</code></pre>\n<p>Also, I suspect that the rle values written to the csv are duplicates (apparently)…</p>\n<p>Has someone experienced this issue? <img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3880742%2F66d1444118f1e0f796d2900185a4e2cf%2Fffe.png?generation=1681402215661324&amp;alt=media\" alt=\"\"></p>",
      "rawMarkdown": "I am modifying the sample notebook and trying to make submissions. The changes mainly include the hyperparameter experiments. But when I submit the notebook, despite the notebook running fine, I get the above error. \n\nThe logs tail as follows:\n```console\n4599.6s\t16\tWall time: 4min 51s\n4650.0s\t17\t/opt/conda/lib/python3.7/site-packages/traitlets/traitlets.py:2935: FutureWarning: --Exporter.preprocessors=[\"remove_papermill_header.RemovePapermillHeader\"] for containers is deprecated in traitlets 5.0. You can pass `--Exporter.preprocessors item` ... multiple times to add items to a list.\n4650.0s\t18\t  FutureWarning,\n4650.0s\t19\t[NbConvertApp] Converting notebook __notebook__.ipynb to notebook\n4673.4s\t20\t[NbConvertApp] Writing 332315 bytes to __notebook__.ipynb\n4685.7s\t21\t/opt/conda/lib/python3.7/site-packages/traitlets/traitlets.py:2935: FutureWarning: --Exporter.preprocessors=[\"nbconvert.preprocessors.ExtractOutputPreprocessor\"] for containers is deprecated in traitlets 5.0. You can pass `--Exporter.preprocessors item` ... multiple times to add items to a list.\n4685.7s\t22\t  FutureWarning,\n4685.7s\t23\t[NbConvertApp] Converting notebook __notebook__.ipynb to html\n4686.9s\t24\t/opt/conda/lib/python3.7/site-packages/bleach/sanitizer.py:168: NoCssSanitizerWarning: 'style' attribute specified, but css_sanitizer not set.\n4686.9s\t25\t  category=NoCssSanitizerWarning,\n4686.9s\t26\t[NbConvertApp] Support files will be in __results___files/\n4686.9s\t27\t[NbConvertApp] Making directory __results___files\n4686.9s\t28\t[NbConvertApp] Making directory __results___files\n4686.9s\t29\t[NbConvertApp] Making directory __results___files\n4686.9s\t30\t[NbConvertApp] Writing 364462 bytes to __results__.html\n```\n\nAlso, I suspect that the rle values written to the csv are duplicates (apparently)...\n\nHas someone experienced this issue? ![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3880742%2F66d1444118f1e0f796d2900185a4e2cf%2Fffe.png?generation=1681402215661324&alt=media)",
      "votes": null
    },
    {
      "id": "2226821",
      "postDate": "04/19/2023 08:55:45",
      "content": "<p>Your RLE needs to be <a href=\"https://www.kaggle.com/competitions/vesuvius-challenge-ink-detection/overview/evaluation\" target=\"_blank\">sorted, positive and not-duplicated</a>.  So yes, that seems to be the source of your problem.  You can debug that in your training environment and fix it before submitting again.</p>",
      "rawMarkdown": "Your RLE needs to be [sorted, positive and not-duplicated](https://www.kaggle.com/competitions/vesuvius-challenge-ink-detection/overview/evaluation).  So yes, that seems to be the source of your problem.  You can debug that in your training environment and fix it before submitting again.",
      "votes": null
    },
    {
      "id": "2251069",
      "postDate": "05/09/2023 03:43:09",
      "content": "<p>Hello, have you solved this problem now? I have been also encountering this problem, how did you haddle it? I am participating in such competition for the first time, and I would greatly appreciate it if could tell me how to solve this problem. Thank you!</p>",
      "rawMarkdown": "Hello, have you solved this problem now? I have been also encountering this problem, how did you haddle it? I am participating in such competition for the first time, and I would greatly appreciate it if could tell me how to solve this problem. Thank you!",
      "votes": null
    },
    {
      "id": "2270134",
      "postDate": "05/23/2023 03:19:00",
      "content": "<p>Now its ur turn, did you find a way?<br>\n<code>def rle(output):\n    flat_img = np.where(output &gt; 0.5, 1, 0).astype(np.uint8)\n    starts = np.array((flat_img[:-1] == 0) &amp; (flat_img[1:] == 1))\n    ends = np.array((flat_img[:-1] == 1) &amp; (flat_img[1:] == 0))\n    starts_ix = np.where(starts)[0] + 2\n    ends_ix = np.where(ends)[0] + 2\n    lengths = ends_ix - starts_ix\n    return \" \".join(map(str, sum(zip(starts_ix, lengths), ())))\n</code> this is the used rle which is as the one provined by th<a href=\"url\" target=\"_blank\">https://gist.github.com/janpaul123/ca3477c1db6de4346affca37e0e3d5b0</a>is </p>",
      "rawMarkdown": "Now its ur turn, did you find a way?\n`def rle(output):\n    flat_img = np.where(output > 0.5, 1, 0).astype(np.uint8)\n    starts = np.array((flat_img[:-1] == 0) & (flat_img[1:] == 1))\n    ends = np.array((flat_img[:-1] == 1) & (flat_img[1:] == 0))\n    starts_ix = np.where(starts)[0] + 2\n    ends_ix = np.where(ends)[0] + 2\n    lengths = ends_ix - starts_ix\n    return \" \".join(map(str, sum(zip(starts_ix, lengths), ())))\n` this is the used rle which is as the one provined by th[https://gist.github.com/janpaul123/ca3477c1db6de4346affca37e0e3d5b0](url)is",
      "votes": null
    },
    {
      "id": "2294658",
      "postDate": "06/10/2023 07:55:50",
      "content": "<p>This page written by host actually directs us to which RLE implementation to use:<br>\n<a href=\"https://www.kaggle.com/competitions/vesuvius-challenge-ink-detection/overview/evaluation\" target=\"_blank\">https://www.kaggle.com/competitions/vesuvius-challenge-ink-detection/overview/evaluation</a></p>",
      "rawMarkdown": "This page written by host actually directs us to which RLE implementation to use:\nhttps://www.kaggle.com/competitions/vesuvius-challenge-ink-detection/overview/evaluation",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 2226821,
      "author_name": "andrewrrose",
      "author_url": "",
      "post_date": "04/19/2023 08:55:45",
      "content": "<p>Your RLE needs to be <a href=\"https://www.kaggle.com/competitions/vesuvius-challenge-ink-detection/overview/evaluation\" target=\"_blank\">sorted, positive and not-duplicated</a>.  So yes, that seems to be the source of your problem.  You can debug that in your training environment and fix it before submitting again.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 2251069,
      "author_name": "luojohn",
      "author_url": "",
      "post_date": "05/09/2023 03:43:09",
      "content": "<p>Hello, have you solved this problem now? I have been also encountering this problem, how did you haddle it? I am participating in such competition for the first time, and I would greatly appreciate it if could tell me how to solve this problem. Thank you!</p>",
      "votes": null,
      "replies": [
        {
          "id": 2270134,
          "author_name": "salaheldinelnabarawy",
          "author_url": "",
          "post_date": "05/23/2023 03:19:00",
          "content": "<p>Now its ur turn, did you find a way?<br>\n<code>def rle(output):\n    flat_img = np.where(output &gt; 0.5, 1, 0).astype(np.uint8)\n    starts = np.array((flat_img[:-1] == 0) &amp; (flat_img[1:] == 1))\n    ends = np.array((flat_img[:-1] == 1) &amp; (flat_img[1:] == 0))\n    starts_ix = np.where(starts)[0] + 2\n    ends_ix = np.where(ends)[0] + 2\n    lengths = ends_ix - starts_ix\n    return \" \".join(map(str, sum(zip(starts_ix, lengths), ())))\n</code> this is the used rle which is as the one provined by th<a href=\"url\" target=\"_blank\">https://gist.github.com/janpaul123/ca3477c1db6de4346affca37e0e3d5b0</a>is </p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 2294658,
      "author_name": "vcolliym",
      "author_url": "",
      "post_date": "06/10/2023 07:55:50",
      "content": "<p>This page written by host actually directs us to which RLE implementation to use:<br>\n<a href=\"https://www.kaggle.com/competitions/vesuvius-challenge-ink-detection/overview/evaluation\" target=\"_blank\">https://www.kaggle.com/competitions/vesuvius-challenge-ink-detection/overview/evaluation</a></p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "2220722": "I am modifying the sample notebook and trying to make submissions. The changes mainly include the hyperparameter experiments. But when I submit the notebook, despite the notebook running fine, I get the above error. \n\nThe logs tail as follows:\n```console\n4599.6s\t16\tWall time: 4min 51s\n4650.0s\t17\t/opt/conda/lib/python3.7/site-packages/traitlets/traitlets.py:2935: FutureWarning: --Exporter.preprocessors=[\"remove_papermill_header.RemovePapermillHeader\"] for containers is deprecated in traitlets 5.0. You can pass `--Exporter.preprocessors item` ... multiple times to add items to a list.\n4650.0s\t18\t  FutureWarning,\n4650.0s\t19\t[NbConvertApp] Converting notebook __notebook__.ipynb to notebook\n4673.4s\t20\t[NbConvertApp] Writing 332315 bytes to __notebook__.ipynb\n4685.7s\t21\t/opt/conda/lib/python3.7/site-packages/traitlets/traitlets.py:2935: FutureWarning: --Exporter.preprocessors=[\"nbconvert.preprocessors.ExtractOutputPreprocessor\"] for containers is deprecated in traitlets 5.0. You can pass `--Exporter.preprocessors item` ... multiple times to add items to a list.\n4685.7s\t22\t  FutureWarning,\n4685.7s\t23\t[NbConvertApp] Converting notebook __notebook__.ipynb to html\n4686.9s\t24\t/opt/conda/lib/python3.7/site-packages/bleach/sanitizer.py:168: NoCssSanitizerWarning: 'style' attribute specified, but css_sanitizer not set.\n4686.9s\t25\t  category=NoCssSanitizerWarning,\n4686.9s\t26\t[NbConvertApp] Support files will be in __results___files/\n4686.9s\t27\t[NbConvertApp] Making directory __results___files\n4686.9s\t28\t[NbConvertApp] Making directory __results___files\n4686.9s\t29\t[NbConvertApp] Making directory __results___files\n4686.9s\t30\t[NbConvertApp] Writing 364462 bytes to __results__.html\n```\n\nAlso, I suspect that the rle values written to the csv are duplicates (apparently)...\n\nHas someone experienced this issue? ![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F3880742%2F66d1444118f1e0f796d2900185a4e2cf%2Fffe.png?generation=1681402215661324&alt=media)",
    "2226821": "Your RLE needs to be [sorted, positive and not-duplicated](https://www.kaggle.com/competitions/vesuvius-challenge-ink-detection/overview/evaluation).  So yes, that seems to be the source of your problem.  You can debug that in your training environment and fix it before submitting again.",
    "2251069": "Hello, have you solved this problem now? I have been also encountering this problem, how did you haddle it? I am participating in such competition for the first time, and I would greatly appreciate it if could tell me how to solve this problem. Thank you!",
    "2270134": "Now its ur turn, did you find a way?\n`def rle(output):\n    flat_img = np.where(output > 0.5, 1, 0).astype(np.uint8)\n    starts = np.array((flat_img[:-1] == 0) & (flat_img[1:] == 1))\n    ends = np.array((flat_img[:-1] == 1) & (flat_img[1:] == 0))\n    starts_ix = np.where(starts)[0] + 2\n    ends_ix = np.where(ends)[0] + 2\n    lengths = ends_ix - starts_ix\n    return \" \".join(map(str, sum(zip(starts_ix, lengths), ())))\n` this is the used rle which is as the one provined by th[https://gist.github.com/janpaul123/ca3477c1db6de4346affca37e0e3d5b0](url)is",
    "2294658": "This page written by host actually directs us to which RLE implementation to use:\nhttps://www.kaggle.com/competitions/vesuvius-challenge-ink-detection/overview/evaluation"
  },
  "source": "meta"
}