{
  "id": 114961,
  "title": "How to change test-data path in stage 2",
  "url": "/competitions/rsna-intracranial-hemorrhage-detection/discussion/114961",
  "author_name": "osakanachan",
  "post_date": "2019-10-30T11:16:25.229000",
  "votes": 4,
  "comment_count": 10,
  "views": 0,
  "content": "<p>Where and how can we rewrite our code after the stage 1 deadline?</p>\n\n<p>Now I hard-code the paths of <code>stage_1_train_images</code> and <code>stage_1_test_images</code>.</p>\n\n<p>I am worried that with no code alternation, my model may fail to load <code>stage_2_test_images</code> successfully in the stage 2 :(</p>\n\n<p><a href=\"https://www.kaggle.com/two-stage-frequently-asked-questions\">Two-Stage Frequently Asked Questions</a> says we can change some of our submitted code, but the procedure is not given explicitly:</p>\n\n<p>&gt; We expect you may need to make some \"non scientific\" alterations, such as changes to path names, in order to create your submissions for the second stage.</p>\n\n<p>Would you help me to figure out what it is like to submit in the non-kernel-only stage 2?</p>",
  "messages": [
    {
      "id": 661484,
      "postDate": "2019-10-30T11:16:25.230Z",
      "content": "<p>Where and how can we rewrite our code after the stage 1 deadline?</p>\n\n<p>Now I hard-code the paths of <code>stage_1_train_images</code> and <code>stage_1_test_images</code>.</p>\n\n<p>I am worried that with no code alternation, my model may fail to load <code>stage_2_test_images</code> successfully in the stage 2 :(</p>\n\n<p><a href=\"https://www.kaggle.com/two-stage-frequently-asked-questions\">Two-Stage Frequently Asked Questions</a> says we can change some of our submitted code, but the procedure is not given explicitly:</p>\n\n<p>&gt; We expect you may need to make some \"non scientific\" alterations, such as changes to path names, in order to create your submissions for the second stage.</p>\n\n<p>Would you help me to figure out what it is like to submit in the non-kernel-only stage 2?</p>",
      "rawMarkdown": "Where and how can we rewrite our code after the stage 1 deadline?\n\nNow I hard-code the paths of `stage_1_train_images` and `stage_1_test_images`.\n\nI am worried that with no code alternation, my model may fail to load `stage_2_test_images` successfully in the stage 2 :(\n\n[Two-Stage Frequently Asked Questions](https://www.kaggle.com/two-stage-frequently-asked-questions) says we can change some of our submitted code, but the procedure is not given explicitly:\n\n&gt; We expect you may need to make some \"non scientific\" alterations, such as changes to path names, in order to create your submissions for the second stage.\n\nWould you help me to figure out what it is like to submit in the non-kernel-only stage 2?",
      "votes": 4
    },
    {
      "id": 661773,
      "postDate": "2019-10-30T17:31:47.937Z",
      "content": "<p>Hi! Good question. As the FAQ states, changes to path names are fine. Essentially, you can change code to make sure that updated input files are read in successfully. Apart from that, any code changes might be a rule violation.</p>",
      "rawMarkdown": "Hi! Good question. As the FAQ states, changes to path names are fine. Essentially, you can change code to make sure that updated input files are read in successfully. Apart from that, any code changes might be a rule violation.",
      "votes": 1,
      "replies": [
        {
          "id": 661953,
          "postDate": "2019-10-30T22:54:59.833Z",
          "content": "<p>I'm a bit confused on messages re what we submit. The rules specify we dont need to upload weights, but some folks said we need <code>..pth</code> or <code>...bin</code> files. If we upload the python code to generate everything, does this suffice ?   </p>",
          "rawMarkdown": "I'm a bit confused on messages re what we submit. The rules specify we dont need to upload weights, but some folks said we need `..pth` or `...bin` files. If we upload the python code to generate everything, does this suffice ?   "
        },
        {
          "id": 662260,
          "postDate": "2019-10-31T10:30:35.647Z",
          "content": "<p><a href=\"/philculliton\">@philculliton</a> Thank you for clarification!\nDuring stage 2, can we edit our code directly via 'My Submissions'? Or can we resubmit our fixed code?</p>",
          "rawMarkdown": "@philculliton Thank you for clarification!\nDuring stage 2, can we edit our code directly via 'My Submissions'? Or can we resubmit our fixed code?"
        },
        {
          "id": 662567,
          "postDate": "2019-10-31T17:43:43.430Z",
          "content": "<p><a href=\"/darraghdog\">@darraghdog</a> \n&gt; If we upload the python code to generate everything, does this suffice ?</p>\n\n<p>Yes!</p>\n\n<p><a href=\"/yutanakamura\">@yutanakamura</a>: First, a caveat that you should not be editing your code in stage 2 (except to make the non-scientific adjustments to load the new data). You would run your code on the stage 2 test set. You would then submit just the predictions, in the same way you did for stage 1. You should not change your model uploaded, as this should already be locked in. If you are in winners' standing, you will be expected to share your full stage 2 code and documentation. It's at that time that the host will compare your locked-in stage 1 code with your final stage 2 code to ensure you have not violated any rules.</p>",
          "rawMarkdown": "@darraghdog \n&gt; If we upload the python code to generate everything, does this suffice ?\n\nYes!\n\n@yutanakamura: First, a caveat that you should not be editing your code in stage 2 (except to make the non-scientific adjustments to load the new data). You would run your code on the stage 2 test set. You would then submit just the predictions, in the same way you did for stage 1. You should not change your model uploaded, as this should already be locked in. If you are in winners' standing, you will be expected to share your full stage 2 code and documentation. It's at that time that the host will compare your locked-in stage 1 code with your final stage 2 code to ensure you have not violated any rules.",
          "votes": 3
        },
        {
          "id": 662712,
          "postDate": "2019-10-31T22:24:22.457Z",
          "content": "<p><a href=\"/juliaelliott\">@juliaelliott</a> So, is hard-coding of the <code>stage{1,2}_test_images</code> not recommended?</p>\n\n<p>If we do that, will we fail to run the model successfully without rule violence in stage 2?</p>",
          "rawMarkdown": "@juliaelliott So, is hard-coding of the `stage{1,2}_test_images` not recommended?\n\nIf we do that, will we fail to run the model successfully without rule violence in stage 2?"
        },
        {
          "id": 665266,
          "postDate": "2019-11-04T20:20:44.570Z",
          "content": "<p><a href=\"/yutanakamura\">@yutanakamura</a> Not recommended as a general practice. But if you do, it would be permitted to change the hard-coding of those test images for stage 2, since that constitutes a \"non-scientific\" change. Meaning, you should generally <strong>not</strong> be making any code changes after the end of stage 1. But, if you need to make slight modifications in order to ingest/load the updated stage 2 test set, that would be permitted.</p>",
          "rawMarkdown": "@yutanakamura Not recommended as a general practice. But if you do, it would be permitted to change the hard-coding of those test images for stage 2, since that constitutes a \"non-scientific\" change. Meaning, you should generally **not** be making any code changes after the end of stage 1. But, if you need to make slight modifications in order to ingest/load the updated stage 2 test set, that would be permitted.",
          "votes": 1
        },
        {
          "id": 665341,
          "postDate": "2019-11-04T22:30:29.840Z",
          "content": "<p><a href=\"/juliaelliott\">@juliaelliott</a>  Thank you! Your advice helps me a lot! </p>",
          "rawMarkdown": "@juliaelliott  Thank you! Your advice helps me a lot! "
        },
        {
          "id": 672565,
          "postDate": "2019-11-14T01:56:54.083Z",
          "content": "<p>Thank you!</p>",
          "rawMarkdown": "Thank you!"
        }
      ]
    },
    {
      "id": 664546,
      "postDate": "2019-11-03T20:59:37.907Z",
      "content": "<p>Hi \nI have to ask you, what all do we have to submit for stage 2. I found the stage 2 FAQs to be really confusing. I have a few questions.\n Fist of all, do we have to upload the model with the architecture or should we only upload the weights of the model ?  Second, do we have to upload the model in a zip file or scan we just upload a .h5 file ? \nThird , how do we upload the code used to generate the model? Does that mean uploading the entire kernel or should I upload a .py file ? \nCould someone please guide me since I am new to stage 2 competitions.</p>",
      "rawMarkdown": "Hi \nI have to ask you, what all do we have to submit for stage 2. I found the stage 2 FAQs to be really confusing. I have a few questions.\n Fist of all, do we have to upload the model with the architecture or should we only upload the weights of the model ?  Second, do we have to upload the model in a zip file or scan we just upload a .h5 file ? \nThird , how do we upload the code used to generate the model? Does that mean uploading the entire kernel or should I upload a .py file ? \nCould someone please guide me since I am new to stage 2 competitions.",
      "replies": [
        {
          "id": 665270,
          "postDate": "2019-11-04T20:25:37.903Z",
          "content": "<blockquote>\n  <p>do we have to upload the model with the architecture or should we only upload the weights of the model ?</p>\n</blockquote>\n\n<p>This is answered in the <a href=\"https://www.kaggle.com/two-stage-frequently-asked-questions\">FAQ</a> under \"What should I upload\"</p>\n\n<blockquote>\n  <p>do we have to upload the model in a zip file or scan we just upload a .h5 file ?</p>\n</blockquote>\n\n<p>If you have more than one file, then upload it as a single .zip. If you have just one .h5 for your model that can generate the .CSV submission, then upload the .h5 directly.</p>\n\n<blockquote>\n  <p>how do we upload the code used to generate the model? Does that mean uploading the entire kernel or should I upload a .py file ?</p>\n</blockquote>\n\n<p>If your kernel/notebook is able to generate the .CSV submission, then download the .py file and use that as your upload.</p>",
          "rawMarkdown": "&gt; do we have to upload the model with the architecture or should we only upload the weights of the model ?\n\nThis is answered in the [FAQ](https://www.kaggle.com/two-stage-frequently-asked-questions) under \"What should I upload\"\n\n&gt; do we have to upload the model in a zip file or scan we just upload a .h5 file ?\n\nIf you have more than one file, then upload it as a single .zip. If you have just one .h5 for your model that can generate the .CSV submission, then upload the .h5 directly.\n\n&gt; how do we upload the code used to generate the model? Does that mean uploading the entire kernel or should I upload a .py file ?\n\nIf your kernel/notebook is able to generate the .CSV submission, then download the .py file and use that as your upload.\n\n",
          "votes": 1
        }
      ]
    }
  ],
  "comments": [
    {
      "id": 661773,
      "author_name": "Phil Culliton",
      "author_url": "",
      "post_date": "2019-10-30T17:31:47.937000",
      "content": "<p>Hi! Good question. As the FAQ states, changes to path names are fine. Essentially, you can change code to make sure that updated input files are read in successfully. Apart from that, any code changes might be a rule violation.</p>",
      "votes": 1,
      "replies": [
        {
          "id": 661953,
          "author_name": "Darragh",
          "author_url": "",
          "post_date": "2019-10-30T22:54:59.833000",
          "content": "<p>I'm a bit confused on messages re what we submit. The rules specify we dont need to upload weights, but some folks said we need <code>..pth</code> or <code>...bin</code> files. If we upload the python code to generate everything, does this suffice ?   </p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 662260,
          "author_name": "osakanachan",
          "author_url": "",
          "post_date": "2019-10-31T10:30:35.647000",
          "content": "<p><a href=\"/philculliton\">@philculliton</a> Thank you for clarification!\nDuring stage 2, can we edit our code directly via 'My Submissions'? Or can we resubmit our fixed code?</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 662567,
          "author_name": "Julia Elliott",
          "author_url": "",
          "post_date": "2019-10-31T17:43:43.430000",
          "content": "<p><a href=\"/darraghdog\">@darraghdog</a> \n&gt; If we upload the python code to generate everything, does this suffice ?</p>\n\n<p>Yes!</p>\n\n<p><a href=\"/yutanakamura\">@yutanakamura</a>: First, a caveat that you should not be editing your code in stage 2 (except to make the non-scientific adjustments to load the new data). You would run your code on the stage 2 test set. You would then submit just the predictions, in the same way you did for stage 1. You should not change your model uploaded, as this should already be locked in. If you are in winners' standing, you will be expected to share your full stage 2 code and documentation. It's at that time that the host will compare your locked-in stage 1 code with your final stage 2 code to ensure you have not violated any rules.</p>",
          "votes": 3,
          "replies": []
        },
        {
          "id": 662712,
          "author_name": "osakanachan",
          "author_url": "",
          "post_date": "2019-10-31T22:24:22.457000",
          "content": "<p><a href=\"/juliaelliott\">@juliaelliott</a> So, is hard-coding of the <code>stage{1,2}_test_images</code> not recommended?</p>\n\n<p>If we do that, will we fail to run the model successfully without rule violence in stage 2?</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 665266,
          "author_name": "Julia Elliott",
          "author_url": "",
          "post_date": "2019-11-04T20:20:44.570000",
          "content": "<p><a href=\"/yutanakamura\">@yutanakamura</a> Not recommended as a general practice. But if you do, it would be permitted to change the hard-coding of those test images for stage 2, since that constitutes a \"non-scientific\" change. Meaning, you should generally <strong>not</strong> be making any code changes after the end of stage 1. But, if you need to make slight modifications in order to ingest/load the updated stage 2 test set, that would be permitted.</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 665341,
          "author_name": "osakanachan",
          "author_url": "",
          "post_date": "2019-11-04T22:30:29.840000",
          "content": "<p><a href=\"/juliaelliott\">@juliaelliott</a>  Thank you! Your advice helps me a lot! </p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 672565,
          "author_name": "osakanachan",
          "author_url": "",
          "post_date": "2019-11-14T01:56:54.083000",
          "content": "<p>Thank you!</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 664546,
      "author_name": "Naman Makkar",
      "author_url": "",
      "post_date": "2019-11-03T20:59:37.907000",
      "content": "<p>Hi \nI have to ask you, what all do we have to submit for stage 2. I found the stage 2 FAQs to be really confusing. I have a few questions.\n Fist of all, do we have to upload the model with the architecture or should we only upload the weights of the model ?  Second, do we have to upload the model in a zip file or scan we just upload a .h5 file ? \nThird , how do we upload the code used to generate the model? Does that mean uploading the entire kernel or should I upload a .py file ? \nCould someone please guide me since I am new to stage 2 competitions.</p>",
      "votes": 0,
      "replies": [
        {
          "id": 665270,
          "author_name": "Julia Elliott",
          "author_url": "",
          "post_date": "2019-11-04T20:25:37.903000",
          "content": "<blockquote>\n  <p>do we have to upload the model with the architecture or should we only upload the weights of the model ?</p>\n</blockquote>\n\n<p>This is answered in the <a href=\"https://www.kaggle.com/two-stage-frequently-asked-questions\">FAQ</a> under \"What should I upload\"</p>\n\n<blockquote>\n  <p>do we have to upload the model in a zip file or scan we just upload a .h5 file ?</p>\n</blockquote>\n\n<p>If you have more than one file, then upload it as a single .zip. If you have just one .h5 for your model that can generate the .CSV submission, then upload the .h5 directly.</p>\n\n<blockquote>\n  <p>how do we upload the code used to generate the model? Does that mean uploading the entire kernel or should I upload a .py file ?</p>\n</blockquote>\n\n<p>If your kernel/notebook is able to generate the .CSV submission, then download the .py file and use that as your upload.</p>",
          "votes": 1,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "661484": "Where and how can we rewrite our code after the stage 1 deadline?\n\nNow I hard-code the paths of `stage_1_train_images` and `stage_1_test_images`.\n\nI am worried that with no code alternation, my model may fail to load `stage_2_test_images` successfully in the stage 2 :(\n\n[Two-Stage Frequently Asked Questions](https://www.kaggle.com/two-stage-frequently-asked-questions) says we can change some of our submitted code, but the procedure is not given explicitly:\n\n&gt; We expect you may need to make some \"non scientific\" alterations, such as changes to path names, in order to create your submissions for the second stage.\n\nWould you help me to figure out what it is like to submit in the non-kernel-only stage 2?",
    "661773": "Hi! Good question. As the FAQ states, changes to path names are fine. Essentially, you can change code to make sure that updated input files are read in successfully. Apart from that, any code changes might be a rule violation.",
    "664546": "Hi \nI have to ask you, what all do we have to submit for stage 2. I found the stage 2 FAQs to be really confusing. I have a few questions.\n Fist of all, do we have to upload the model with the architecture or should we only upload the weights of the model ?  Second, do we have to upload the model in a zip file or scan we just upload a .h5 file ? \nThird , how do we upload the code used to generate the model? Does that mean uploading the entire kernel or should I upload a .py file ? \nCould someone please guide me since I am new to stage 2 competitions."
  }
}