{
  "id": 355355,
  "title": "Submission scoring error",
  "url": "/competitions/rsna-2022-cervical-spine-fracture-detection/discussion/355355",
  "author_name": "Collide_Conquer_19",
  "post_date": "2022-09-26T12:08:02.385000",
  "votes": 1,
  "comment_count": 3,
  "views": 0,
  "content": "<p>Hello <a href=\"https://www.kaggle.com/solverworld\" target=\"_blank\">@solverworld</a> and all kagglers <a href=\"https://www.kaggle.com/vslaykovsky\" target=\"_blank\">@vslaykovsky</a> have completed the infernece phase of vit3d and also generated the submission file as required and when I have submitted the submission file it's throwing an error of submissions score error.</p>\n<p>Please have a look at my <a href=\"https://www.kaggle.com/code/robber19/vit3d-infer/notebook\" target=\"_blank\">code</a> and let me know the solution or problems which are attached to it.</p>\n<p>Thanking you in advance.<br>\nConquer_19.</p>",
  "messages": [
    {
      "id": 1956357,
      "postDate": "2022-09-26T12:08:02.387Z",
      "content": "<p>Hello <a href=\"https://www.kaggle.com/solverworld\" target=\"_blank\">@solverworld</a> and all kagglers <a href=\"https://www.kaggle.com/vslaykovsky\" target=\"_blank\">@vslaykovsky</a> have completed the infernece phase of vit3d and also generated the submission file as required and when I have submitted the submission file it's throwing an error of submissions score error.</p>\n<p>Please have a look at my <a href=\"https://www.kaggle.com/code/robber19/vit3d-infer/notebook\" target=\"_blank\">code</a> and let me know the solution or problems which are attached to it.</p>\n<p>Thanking you in advance.<br>\nConquer_19.</p>",
      "rawMarkdown": "Hello @solverworld and all kagglers @vslaykovsky have completed the infernece phase of vit3d and also generated the submission file as required and when I have submitted the submission file it's throwing an error of submissions score error.\n\nPlease have a look at my [code](https://www.kaggle.com/code/robber19/vit3d-infer/notebook) and let me know the solution or problems which are attached to it.\n\nThanking you in advance.\nConquer_19.",
      "votes": 1
    },
    {
      "id": 1957378,
      "postDate": "2022-09-26T23:33:54.160Z",
      "content": "<p>This isn't the source of an Exception, but one mistake I see is that you sort the slice files by their name.  This will be an alphabetic sort and not a numerical sort.  It will put 21.dcm before 3.dcm, for example.  There are public notebooks that have example of the correct sort, something like:</p>\n<pre><code>        slice_files = glob.glob('path_for_train_files/*.dcm')\n        slice_files.sort(key=lambda x: int(os.path.splitext(os.path.basename(x))[0]))\n</code></pre>",
      "rawMarkdown": "This isn't the source of an Exception, but one mistake I see is that you sort the slice files by their name.  This will be an alphabetic sort and not a numerical sort.  It will put 21.dcm before 3.dcm, for example.  There are public notebooks that have example of the correct sort, something like:\n```\n        slice_files = glob.glob('path_for_train_files/*.dcm')\n        slice_files.sort(key=lambda x: int(os.path.splitext(os.path.basename(x))[0]))\n```"
    },
    {
      "id": 1956482,
      "postDate": "2022-09-26T13:27:47.637Z",
      "content": "<p>Hi,<br>\nAs far as I understand, this is the notebook you are directly submitting, right? If so, there is a problem with this line:</p>\n<pre><code>df['row_id'] = df['row_id'].replace(['1.2.826.0.1.3680043.22327_C8','1.2.826.0.1.3680043.25399_C8','1.2.826.0.1.3680043.5876_C8'],['1.2.826.0.1.3680043.22327_patient_overall','1.2.826.0.1.3680043.25399_patient_overall','1.2.826.0.1.3680043.5876_patient_overall'])\n</code></pre>\n<p>As this line only works for the three examples in the public <code>/test</code> folder because unseen samples have different <em>SOPInstanceUIDs</em>. I would suggest using something like this:</p>\n<pre><code>df['row_id'].replace(to_replace=r'_C8', value='_patient_overall', regex=True, inplace=True)\n</code></pre>\n<p>Hope this solves the issue.</p>",
      "rawMarkdown": "Hi,\nAs far as I understand, this is the notebook you are directly submitting, right? If so, there is a problem with this line:\n\n\n```\ndf['row_id'] = df['row_id'].replace(['1.2.826.0.1.3680043.22327_C8','1.2.826.0.1.3680043.25399_C8','1.2.826.0.1.3680043.5876_C8'],['1.2.826.0.1.3680043.22327_patient_overall','1.2.826.0.1.3680043.25399_patient_overall','1.2.826.0.1.3680043.5876_patient_overall'])\n```\n\nAs this line only works for the three examples in the public `/test` folder because unseen samples have different *SOPInstanceUIDs*. I would suggest using something like this:\n\n```\ndf['row_id'].replace(to_replace=r'_C8', value='_patient_overall', regex=True, inplace=True)\n```\n\nHope this solves the issue.",
      "replies": [
        {
          "id": 1956529,
          "postDate": "2022-09-26T13:49:40.490Z",
          "content": "<p>Hope this helps and I'll try your input and report the same.</p>\n<p>Thanks, <br>\nConquer _19.</p>",
          "rawMarkdown": "Hope this helps and I'll try your input and report the same.\n\nThanks, \nConquer _19."
        }
      ]
    }
  ],
  "comments": [
    {
      "id": 1957378,
      "author_name": "SolverWorld",
      "author_url": "",
      "post_date": "2022-09-26T23:33:54.160000",
      "content": "<p>This isn't the source of an Exception, but one mistake I see is that you sort the slice files by their name.  This will be an alphabetic sort and not a numerical sort.  It will put 21.dcm before 3.dcm, for example.  There are public notebooks that have example of the correct sort, something like:</p>\n<pre><code>        slice_files = glob.glob('path_for_train_files/*.dcm')\n        slice_files.sort(key=lambda x: int(os.path.splitext(os.path.basename(x))[0]))\n</code></pre>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1956482,
      "author_name": "Bardia Khosravi",
      "author_url": "",
      "post_date": "2022-09-26T13:27:47.637000",
      "content": "<p>Hi,<br>\nAs far as I understand, this is the notebook you are directly submitting, right? If so, there is a problem with this line:</p>\n<pre><code>df['row_id'] = df['row_id'].replace(['1.2.826.0.1.3680043.22327_C8','1.2.826.0.1.3680043.25399_C8','1.2.826.0.1.3680043.5876_C8'],['1.2.826.0.1.3680043.22327_patient_overall','1.2.826.0.1.3680043.25399_patient_overall','1.2.826.0.1.3680043.5876_patient_overall'])\n</code></pre>\n<p>As this line only works for the three examples in the public <code>/test</code> folder because unseen samples have different <em>SOPInstanceUIDs</em>. I would suggest using something like this:</p>\n<pre><code>df['row_id'].replace(to_replace=r'_C8', value='_patient_overall', regex=True, inplace=True)\n</code></pre>\n<p>Hope this solves the issue.</p>",
      "votes": 0,
      "replies": [
        {
          "id": 1956529,
          "author_name": "Collide_Conquer_19",
          "author_url": "",
          "post_date": "2022-09-26T13:49:40.490000",
          "content": "<p>Hope this helps and I'll try your input and report the same.</p>\n<p>Thanks, <br>\nConquer _19.</p>",
          "votes": 0,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1956357": "Hello @solverworld and all kagglers @vslaykovsky have completed the infernece phase of vit3d and also generated the submission file as required and when I have submitted the submission file it's throwing an error of submissions score error.\n\nPlease have a look at my [code](https://www.kaggle.com/code/robber19/vit3d-infer/notebook) and let me know the solution or problems which are attached to it.\n\nThanking you in advance.\nConquer_19.",
    "1957378": "This isn't the source of an Exception, but one mistake I see is that you sort the slice files by their name.  This will be an alphabetic sort and not a numerical sort.  It will put 21.dcm before 3.dcm, for example.  There are public notebooks that have example of the correct sort, something like:\n```\n        slice_files = glob.glob('path_for_train_files/*.dcm')\n        slice_files.sort(key=lambda x: int(os.path.splitext(os.path.basename(x))[0]))\n```",
    "1956482": "Hi,\nAs far as I understand, this is the notebook you are directly submitting, right? If so, there is a problem with this line:\n\n\n```\ndf['row_id'] = df['row_id'].replace(['1.2.826.0.1.3680043.22327_C8','1.2.826.0.1.3680043.25399_C8','1.2.826.0.1.3680043.5876_C8'],['1.2.826.0.1.3680043.22327_patient_overall','1.2.826.0.1.3680043.25399_patient_overall','1.2.826.0.1.3680043.5876_patient_overall'])\n```\n\nAs this line only works for the three examples in the public `/test` folder because unseen samples have different *SOPInstanceUIDs*. I would suggest using something like this:\n\n```\ndf['row_id'].replace(to_replace=r'_C8', value='_patient_overall', regex=True, inplace=True)\n```\n\nHope this solves the issue."
  }
}