{
  "id": 244549,
  "title": "Some questions about \"Code Competition\"",
  "url": "/competitions/siim-covid19-detection/discussion/244549",
  "author_name": "README",
  "post_date": "2021-06-07T10:30:35.660000",
  "votes": 2,
  "comment_count": 17,
  "views": 0,
  "content": "<p>We can see some official limitations about notebook in this \"Code Competition\":</p>\n<blockquote>\n  <p>Submissions to this competition must be made through Notebooks. In order for the \"Submit\" button to be active after a commit, the following conditions must be met:</p>\n  <ol>\n  <li>CPU Notebook &lt;= 9 hours run-time</li>\n  <li>GPU Notebook &lt;= 9 hours run-time</li>\n  <li>Internet access disabled</li>\n  <li>Freely &amp; publicly available external data is allowed, including pre-trained models</li>\n  <li>Submission file must be named submission.csv</li>\n  </ol>\n</blockquote>\n<p>I don't know the difference between \"Code Competition\" and other competitions, so i have some questions about this \"Code Competition\":😂😂</p>\n<p>Question1: Suppose I need to read a pre-trained CNN model, because the final submission code (notebook2) cannot be connected to the Internet, can I first create another code (notebook1) and save the model after reading the pre-trained model in an online state. Then notebook2 read the pre-trained model saved in notebook1 in the offline state, and finally perform training and inference?</p>\n<p>Question2: If I have trained a model and predicted the final result (submission.csv) on my own computer, can I upload the result (submission.csv) to Datasets, then create a new notebook to read the submission.csv saved in the Datasets, and finally use the notebook to submit the submission.csv?</p>\n<p>Any reply will be greatly appreciated.</p>",
  "messages": [
    {
      "id": 1339741,
      "postDate": "2021-06-07T12:42:41.263Z",
      "content": "<ol>\n<li>Yes. You can create a dataset for the model you’ve trained in your training notebook, and the use the dataset in your inference (submission) notebook. (If you re-train your model you can then easily update your dataset which will then be used the next time you re-submit.</li>\n<li>No. The submission is run on a hidden test set when you submit that you do not have access to beforehand.</li>\n</ol>",
      "rawMarkdown": "1. Yes. You can create a dataset for the model you’ve trained in your training notebook, and the use the dataset in your inference (submission) notebook. (If you re-train your model you can then easily update your dataset which will then be used the next time you re-submit.\n2. No. The submission is run on a hidden test set when you submit that you do not have access to beforehand.",
      "votes": 4,
      "replies": [
        {
          "id": 1340476,
          "postDate": "2021-06-08T02:32:38.050Z",
          "content": "<p>You solved my doubts, thank you very much!</p>",
          "rawMarkdown": "You solved my doubts, thank you very much!"
        },
        {
          "id": 1350185,
          "postDate": "2021-06-15T10:20:15.487Z",
          "rawMarkdown": "",
          "isDeleted": true
        },
        {
          "id": 1350204,
          "postDate": "2021-06-15T10:39:15.810Z",
          "content": "<p>You do not need to make your trained models public. Nor you have to publish your inference kernel during the competition ongoing.</p>",
          "rawMarkdown": "You do not need to make your trained models public. Nor you have to publish your inference kernel during the competition ongoing."
        },
        {
          "id": 1350205,
          "postDate": "2021-06-15T10:42:09.297Z",
          "content": "<p>Hello, <a href=\"https://www.kaggle.com/ashutosh3060\" target=\"_blank\">@ashutosh3060</a> , you don't need to make your model weights public for inference, private notebook which save the pretrained model weight or dataset ( you can upload your model weight to private dataset ) can still import to your inference notebook.</p>\n<p>As for the second question, sorry, I don’t quite understand the meaning this question.</p>",
          "rawMarkdown": "Hello, @ashutosh3060 , you don't need to make your model weights public for inference, private notebook which save the pretrained model weight or dataset ( you can upload your model weight to private dataset ) can still import to your inference notebook.\n\nAs for the second question, sorry, I don’t quite understand the meaning this question.",
          "votes": 1
        },
        {
          "id": 1350254,
          "postDate": "2021-06-15T11:36:11.840Z",
          "rawMarkdown": "",
          "isDeleted": true
        },
        {
          "id": 1350462,
          "postDate": "2021-06-15T13:06:26.900Z",
          "content": "<p>In your inference notebook, go to &gt;&gt; add data &gt;&gt; Your datasets. You should see your datasets there.</p>",
          "rawMarkdown": "In your inference notebook, go to >> add data >> Your datasets. You should see your datasets there.",
          "votes": 1
        },
        {
          "id": 1350498,
          "postDate": "2021-06-15T13:35:45.177Z",
          "rawMarkdown": "",
          "votes": 1,
          "isDeleted": true
        }
      ]
    },
    {
      "id": 1370433,
      "postDate": "2021-06-30T06:57:09.733Z",
      "content": "<p>Hi <a href=\"https://www.kaggle.com/shangweichen\" target=\"_blank\">@shangweichen</a> ~~<br>\nI don't understand about the second question.<br>\nShouldn't we only predict all the samples in the test folder? What is the hidden test set? Can I only predict the png files I converted offline or should I convert and predict them from the original DICOM test folder online?<br>\nThanks!</p>",
      "rawMarkdown": "Hi @shangweichen ~~\nI don't understand about the second question.\nShouldn't we only predict all the samples in the test folder? What is the hidden test set? Can I only predict the png files I converted offline or should I convert and predict them from the original DICOM test folder online?\nThanks!",
      "votes": 1,
      "replies": [
        {
          "id": 1370474,
          "postDate": "2021-06-30T07:30:35.743Z",
          "content": "<p>Hi, <a href=\"https://www.kaggle.com/terenceythsu\" target=\"_blank\">@terenceythsu</a> , your inference code will run background with hidden test set when you submit your inference results, instead of the test set you see now. Official will replace the test set you see now with a hidden test set when you submit. So if you predict the png files which you converted offline, you will get error when you submit your results. You must explicitly convert the DICOM test data in your inference code.</p>",
          "rawMarkdown": "Hi, @terenceythsu , your inference code will run background with hidden test set when you submit your inference results, instead of the test set you see now. Official will replace the test set you see now with a hidden test set when you submit. So if you predict the png files which you converted offline, you will get error when you submit your results. You must explicitly convert the DICOM test data in your inference code.",
          "votes": 1
        },
        {
          "id": 1370485,
          "postDate": "2021-06-30T07:36:17.897Z",
          "content": "<p>Thanks a lot!! Appreciate for your instant reply! <a href=\"https://www.kaggle.com/shangweichen\" target=\"_blank\">@shangweichen</a> <br>\nThat means, I can assume the hidden test folder root and data format be the same as the released one, isn't it?</p>",
          "rawMarkdown": "Thanks a lot!! Appreciate for your instant reply! @shangweichen \nThat means, I can assume the hidden test folder root and data format be the same as the released one, isn't it?"
        },
        {
          "id": 1370494,
          "postDate": "2021-06-30T07:42:03.087Z",
          "content": "<p>Yes, the hidden test set folder root and data format be the same as the test set you see now, just adding some hidden dicom data in the test set folder.</p>",
          "rawMarkdown": "Yes, the hidden test set folder root and data format be the same as the test set you see now, just adding some hidden dicom data in the test set folder.",
          "votes": 1
        }
      ]
    },
    {
      "id": 1362243,
      "postDate": "2021-06-23T09:49:15.100Z",
      "content": "<p>So we have to submit a notebook that  1)imports our pretrained weights from the datasets, 2)generate predictions from that model over test dataset provided in competition, 3)save those results in csv .<br>\nAm i right ?</p>",
      "rawMarkdown": "So we have to submit a notebook that  1)imports our pretrained weights from the datasets, 2)generate predictions from that model over test dataset provided in competition, 3)save those results in csv .\nAm i right ?",
      "votes": 1,
      "replies": [
        {
          "id": 1362247,
          "postDate": "2021-06-23T09:58:05.523Z",
          "content": "<p>Completely right!</p>",
          "rawMarkdown": "Completely right!"
        },
        {
          "id": 1362258,
          "postDate": "2021-06-23T10:12:45.810Z",
          "content": "<p>Thank you very much !!</p>",
          "rawMarkdown": "Thank you very much !!"
        }
      ]
    },
    {
      "id": 1359650,
      "postDate": "2021-06-21T12:22:46.743Z",
      "content": "<p>The original test data is in dicom format so will be the hidden evaluation data I suppose. Should the inference notebook contain code to construct JPGs out of dicoms then before feeding it to the model ? In that case, if we need internet to pul some libraries how do we get them without internet?</p>",
      "rawMarkdown": "The original test data is in dicom format so will be the hidden evaluation data I suppose. Should the inference notebook contain code to construct JPGs out of dicoms then before feeding it to the model ? In that case, if we need internet to pul some libraries how do we get them without internet?",
      "votes": 1,
      "replies": [
        {
          "id": 1359724,
          "postDate": "2021-06-21T13:26:44.027Z",
          "content": "<p>You can import the output of this <a href=\"https://www.kaggle.com/awsaf49/pydicom-conda-helper/comments\" target=\"_blank\">notebook</a>, and then run below commands at the beginning of the inference notebook:<br>\n<code>!conda install '/kaggle/input/pydicom-conda-helper/libjpeg-turbo-2.1.0-h7f98852_0.tar.bz2' -c conda-forge -y</code><br>\n<code>!conda install '/kaggle/input/pydicom-conda-helper/libgcc-ng-9.3.0-h2828fa1_19.tar.bz2' -c conda-forge -y</code><br>\n<code>!conda install '/kaggle/input/pydicom-conda-helper/gdcm-2.8.9-py37h500ead1_1.tar.bz2' -c conda-forge -y</code><br>\n<code>!conda install '/kaggle/input/pydicom-conda-helper/conda-4.10.1-py37h89c1867_0.tar.bz2' -c conda-forge -y</code><br>\n<code>!conda install '/kaggle/input/pydicom-conda-helper/certifi-2020.12.5-py37h89c1867_1.tar.bz2' -c conda-forge -y</code><br>\n<code>!conda install '/kaggle/input/pydicom-conda-helper/openssl-1.1.1k-h7f98852_0.tar.bz2' -c conda-forge -y</code></p>\n<p>After this, you can use these libraries in your inference notebook at the offline state.</p>",
          "rawMarkdown": "You can import the output of this [notebook](https://www.kaggle.com/awsaf49/pydicom-conda-helper/comments), and then run below commands at the beginning of the inference notebook:\n`!conda install '/kaggle/input/pydicom-conda-helper/libjpeg-turbo-2.1.0-h7f98852_0.tar.bz2' -c conda-forge -y`\n`!conda install '/kaggle/input/pydicom-conda-helper/libgcc-ng-9.3.0-h2828fa1_19.tar.bz2' -c conda-forge -y`\n`!conda install '/kaggle/input/pydicom-conda-helper/gdcm-2.8.9-py37h500ead1_1.tar.bz2' -c conda-forge -y`\n`!conda install '/kaggle/input/pydicom-conda-helper/conda-4.10.1-py37h89c1867_0.tar.bz2' -c conda-forge -y`\n`!conda install '/kaggle/input/pydicom-conda-helper/certifi-2020.12.5-py37h89c1867_1.tar.bz2' -c conda-forge -y`\n`!conda install '/kaggle/input/pydicom-conda-helper/openssl-1.1.1k-h7f98852_0.tar.bz2' -c conda-forge -y`\n\nAfter this, you can use these libraries in your inference notebook at the offline state."
        }
      ]
    },
    {
      "id": 1339574,
      "postDate": "2021-06-07T10:30:35.660Z",
      "content": "<p>We can see some official limitations about notebook in this \"Code Competition\":</p>\n<blockquote>\n  <p>Submissions to this competition must be made through Notebooks. In order for the \"Submit\" button to be active after a commit, the following conditions must be met:</p>\n  <ol>\n  <li>CPU Notebook &lt;= 9 hours run-time</li>\n  <li>GPU Notebook &lt;= 9 hours run-time</li>\n  <li>Internet access disabled</li>\n  <li>Freely &amp; publicly available external data is allowed, including pre-trained models</li>\n  <li>Submission file must be named submission.csv</li>\n  </ol>\n</blockquote>\n<p>I don't know the difference between \"Code Competition\" and other competitions, so i have some questions about this \"Code Competition\":😂😂</p>\n<p>Question1: Suppose I need to read a pre-trained CNN model, because the final submission code (notebook2) cannot be connected to the Internet, can I first create another code (notebook1) and save the model after reading the pre-trained model in an online state. Then notebook2 read the pre-trained model saved in notebook1 in the offline state, and finally perform training and inference?</p>\n<p>Question2: If I have trained a model and predicted the final result (submission.csv) on my own computer, can I upload the result (submission.csv) to Datasets, then create a new notebook to read the submission.csv saved in the Datasets, and finally use the notebook to submit the submission.csv?</p>\n<p>Any reply will be greatly appreciated.</p>",
      "rawMarkdown": "We can see some official limitations about notebook in this \"Code Competition\":\n\n> Submissions to this competition must be made through Notebooks. In order for the \"Submit\" button to be active after a commit, the following conditions must be met:\n1. CPU Notebook <= 9 hours run-time\n2. GPU Notebook <= 9 hours run-time\n3. Internet access disabled\n4. Freely & publicly available external data is allowed, including pre-trained models\n5. Submission file must be named submission.csv\n\nI don't know the difference between \"Code Competition\" and other competitions, so i have some questions about this \"Code Competition\":😂😂\n\nQuestion1: Suppose I need to read a pre-trained CNN model, because the final submission code (notebook2) cannot be connected to the Internet, can I first create another code (notebook1) and save the model after reading the pre-trained model in an online state. Then notebook2 read the pre-trained model saved in notebook1 in the offline state, and finally perform training and inference?\n\nQuestion2: If I have trained a model and predicted the final result (submission.csv) on my own computer, can I upload the result (submission.csv) to Datasets, then create a new notebook to read the submission.csv saved in the Datasets, and finally use the notebook to submit the submission.csv?\n\nAny reply will be greatly appreciated.",
      "votes": 2
    }
  ],
  "comments": [
    {
      "id": 1339741,
      "author_name": "Christoffer Karlsson",
      "author_url": "",
      "post_date": "2021-06-07T12:42:41.263000",
      "content": "<ol>\n<li>Yes. You can create a dataset for the model you’ve trained in your training notebook, and the use the dataset in your inference (submission) notebook. (If you re-train your model you can then easily update your dataset which will then be used the next time you re-submit.</li>\n<li>No. The submission is run on a hidden test set when you submit that you do not have access to beforehand.</li>\n</ol>",
      "votes": 4,
      "replies": [
        {
          "id": 1340476,
          "author_name": "README",
          "author_url": "",
          "post_date": "2021-06-08T02:32:38.050000",
          "content": "<p>You solved my doubts, thank you very much!</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1350185,
          "author_name": "",
          "author_url": "",
          "post_date": "2021-06-15T10:20:15.487000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1350204,
          "author_name": "Mohammad Zunaed",
          "author_url": "",
          "post_date": "2021-06-15T10:39:15.810000",
          "content": "<p>You do not need to make your trained models public. Nor you have to publish your inference kernel during the competition ongoing.</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1350205,
          "author_name": "README",
          "author_url": "",
          "post_date": "2021-06-15T10:42:09.297000",
          "content": "<p>Hello, <a href=\"https://www.kaggle.com/ashutosh3060\" target=\"_blank\">@ashutosh3060</a> , you don't need to make your model weights public for inference, private notebook which save the pretrained model weight or dataset ( you can upload your model weight to private dataset ) can still import to your inference notebook.</p>\n<p>As for the second question, sorry, I don’t quite understand the meaning this question.</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1350254,
          "author_name": "",
          "author_url": "",
          "post_date": "2021-06-15T11:36:11.840000",
          "content": "",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1350462,
          "author_name": "Mohammad Zunaed",
          "author_url": "",
          "post_date": "2021-06-15T13:06:26.900000",
          "content": "<p>In your inference notebook, go to &gt;&gt; add data &gt;&gt; Your datasets. You should see your datasets there.</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1350498,
          "author_name": "",
          "author_url": "",
          "post_date": "2021-06-15T13:35:45.177000",
          "content": "",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 1370433,
      "author_name": "lazyterence",
      "author_url": "",
      "post_date": "2021-06-30T06:57:09.733000",
      "content": "<p>Hi <a href=\"https://www.kaggle.com/shangweichen\" target=\"_blank\">@shangweichen</a> ~~<br>\nI don't understand about the second question.<br>\nShouldn't we only predict all the samples in the test folder? What is the hidden test set? Can I only predict the png files I converted offline or should I convert and predict them from the original DICOM test folder online?<br>\nThanks!</p>",
      "votes": 1,
      "replies": [
        {
          "id": 1370474,
          "author_name": "README",
          "author_url": "",
          "post_date": "2021-06-30T07:30:35.743000",
          "content": "<p>Hi, <a href=\"https://www.kaggle.com/terenceythsu\" target=\"_blank\">@terenceythsu</a> , your inference code will run background with hidden test set when you submit your inference results, instead of the test set you see now. Official will replace the test set you see now with a hidden test set when you submit. So if you predict the png files which you converted offline, you will get error when you submit your results. You must explicitly convert the DICOM test data in your inference code.</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1370485,
          "author_name": "lazyterence",
          "author_url": "",
          "post_date": "2021-06-30T07:36:17.897000",
          "content": "<p>Thanks a lot!! Appreciate for your instant reply! <a href=\"https://www.kaggle.com/shangweichen\" target=\"_blank\">@shangweichen</a> <br>\nThat means, I can assume the hidden test folder root and data format be the same as the released one, isn't it?</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1370494,
          "author_name": "README",
          "author_url": "",
          "post_date": "2021-06-30T07:42:03.087000",
          "content": "<p>Yes, the hidden test set folder root and data format be the same as the test set you see now, just adding some hidden dicom data in the test set folder.</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 1362243,
      "author_name": "AJINKYA DESHPANDE",
      "author_url": "",
      "post_date": "2021-06-23T09:49:15.100000",
      "content": "<p>So we have to submit a notebook that  1)imports our pretrained weights from the datasets, 2)generate predictions from that model over test dataset provided in competition, 3)save those results in csv .<br>\nAm i right ?</p>",
      "votes": 1,
      "replies": [
        {
          "id": 1362247,
          "author_name": "README",
          "author_url": "",
          "post_date": "2021-06-23T09:58:05.523000",
          "content": "<p>Completely right!</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1362258,
          "author_name": "AJINKYA DESHPANDE",
          "author_url": "",
          "post_date": "2021-06-23T10:12:45.810000",
          "content": "<p>Thank you very much !!</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1359650,
      "author_name": "Srikanth Machiraju",
      "author_url": "",
      "post_date": "2021-06-21T12:22:46.743000",
      "content": "<p>The original test data is in dicom format so will be the hidden evaluation data I suppose. Should the inference notebook contain code to construct JPGs out of dicoms then before feeding it to the model ? In that case, if we need internet to pul some libraries how do we get them without internet?</p>",
      "votes": 1,
      "replies": [
        {
          "id": 1359724,
          "author_name": "README",
          "author_url": "",
          "post_date": "2021-06-21T13:26:44.027000",
          "content": "<p>You can import the output of this <a href=\"https://www.kaggle.com/awsaf49/pydicom-conda-helper/comments\" target=\"_blank\">notebook</a>, and then run below commands at the beginning of the inference notebook:<br>\n<code>!conda install '/kaggle/input/pydicom-conda-helper/libjpeg-turbo-2.1.0-h7f98852_0.tar.bz2' -c conda-forge -y</code><br>\n<code>!conda install '/kaggle/input/pydicom-conda-helper/libgcc-ng-9.3.0-h2828fa1_19.tar.bz2' -c conda-forge -y</code><br>\n<code>!conda install '/kaggle/input/pydicom-conda-helper/gdcm-2.8.9-py37h500ead1_1.tar.bz2' -c conda-forge -y</code><br>\n<code>!conda install '/kaggle/input/pydicom-conda-helper/conda-4.10.1-py37h89c1867_0.tar.bz2' -c conda-forge -y</code><br>\n<code>!conda install '/kaggle/input/pydicom-conda-helper/certifi-2020.12.5-py37h89c1867_1.tar.bz2' -c conda-forge -y</code><br>\n<code>!conda install '/kaggle/input/pydicom-conda-helper/openssl-1.1.1k-h7f98852_0.tar.bz2' -c conda-forge -y</code></p>\n<p>After this, you can use these libraries in your inference notebook at the offline state.</p>",
          "votes": 0,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1339741": "1. Yes. You can create a dataset for the model you’ve trained in your training notebook, and the use the dataset in your inference (submission) notebook. (If you re-train your model you can then easily update your dataset which will then be used the next time you re-submit.\n2. No. The submission is run on a hidden test set when you submit that you do not have access to beforehand.",
    "1370433": "Hi @shangweichen ~~\nI don't understand about the second question.\nShouldn't we only predict all the samples in the test folder? What is the hidden test set? Can I only predict the png files I converted offline or should I convert and predict them from the original DICOM test folder online?\nThanks!",
    "1362243": "So we have to submit a notebook that  1)imports our pretrained weights from the datasets, 2)generate predictions from that model over test dataset provided in competition, 3)save those results in csv .\nAm i right ?",
    "1359650": "The original test data is in dicom format so will be the hidden evaluation data I suppose. Should the inference notebook contain code to construct JPGs out of dicoms then before feeding it to the model ? In that case, if we need internet to pul some libraries how do we get them without internet?",
    "1339574": "We can see some official limitations about notebook in this \"Code Competition\":\n\n> Submissions to this competition must be made through Notebooks. In order for the \"Submit\" button to be active after a commit, the following conditions must be met:\n1. CPU Notebook <= 9 hours run-time\n2. GPU Notebook <= 9 hours run-time\n3. Internet access disabled\n4. Freely & publicly available external data is allowed, including pre-trained models\n5. Submission file must be named submission.csv\n\nI don't know the difference between \"Code Competition\" and other competitions, so i have some questions about this \"Code Competition\":😂😂\n\nQuestion1: Suppose I need to read a pre-trained CNN model, because the final submission code (notebook2) cannot be connected to the Internet, can I first create another code (notebook1) and save the model after reading the pre-trained model in an online state. Then notebook2 read the pre-trained model saved in notebook1 in the offline state, and finally perform training and inference?\n\nQuestion2: If I have trained a model and predicted the final result (submission.csv) on my own computer, can I upload the result (submission.csv) to Datasets, then create a new notebook to read the submission.csv saved in the Datasets, and finally use the notebook to submit the submission.csv?\n\nAny reply will be greatly appreciated."
  }
}