{
  "id": 475467,
  "title": "Rule Clarification for Use of Pre-trained Models",
  "url": "/competitions/hms-harmful-brain-activity-classification/discussion/475467",
  "author_name": "",
  "post_date": "2024-02-08T15:00:11.052616500Z",
  "votes": 5,
  "comment_count": 12,
  "views": 0,
  "content": "<p>Hi all,</p>\n<p>Apologies if it's been asked already, but can someone please clarify this section of the \"Code Competition\" <a href=\"www.kaggle.com/competitions/hms-harmful-brain-activity-classification/overview/code-requirements\" target=\"_blank\">rules</a>:</p>\n<ul>\n<li>Freely &amp; publicly available external data is allowed, including pre-trained models</li>\n</ul>\n<p>I initially took this to mean that you can use pre-trained models that are freely &amp; publicly available, but after digging around to past competitions, I now understand it means that private model training is typically done offline, and the allotted 9 hours for CPU/GPU time in the notebook is simply for inference on the test data and postprocessing.  </p>\n<p>In support of this conclusion, see <a href=\"https://www.kaggle.com/competitions/feedback-prize-2021/discussion/313177\" target=\"_blank\">this discussion</a>, where the 1st-place submission mentions needing to train offline since Kaggle \"online resources are insufficient\".<br>\nThe Code Requirements section of the associated competition is nearly identical to ours:<br>\n<a href=\"http://www.kaggle.com/competitions/feedback-prize-2021/overview/code-requirements\" target=\"_blank\">www.kaggle.com/competitions/feedback-prize-2021/overview/code-requirements</a></p>\n<p>With that info, can someone please answer that definitively, yes, we can privately train our models offline, upload them as data sources to our notebook, use them for inference in the competition, and remain within the rules?</p>",
  "messages": [
    {
      "id": "2643002",
      "postDate": "02/08/2024 15:00:11",
      "content": "<p>Hi all,</p>\n<p>Apologies if it's been asked already, but can someone please clarify this section of the \"Code Competition\" <a href=\"www.kaggle.com/competitions/hms-harmful-brain-activity-classification/overview/code-requirements\" target=\"_blank\">rules</a>:</p>\n<ul>\n<li>Freely &amp; publicly available external data is allowed, including pre-trained models</li>\n</ul>\n<p>I initially took this to mean that you can use pre-trained models that are freely &amp; publicly available, but after digging around to past competitions, I now understand it means that private model training is typically done offline, and the allotted 9 hours for CPU/GPU time in the notebook is simply for inference on the test data and postprocessing.  </p>\n<p>In support of this conclusion, see <a href=\"https://www.kaggle.com/competitions/feedback-prize-2021/discussion/313177\" target=\"_blank\">this discussion</a>, where the 1st-place submission mentions needing to train offline since Kaggle \"online resources are insufficient\".<br>\nThe Code Requirements section of the associated competition is nearly identical to ours:<br>\n<a href=\"http://www.kaggle.com/competitions/feedback-prize-2021/overview/code-requirements\" target=\"_blank\">www.kaggle.com/competitions/feedback-prize-2021/overview/code-requirements</a></p>\n<p>With that info, can someone please answer that definitively, yes, we can privately train our models offline, upload them as data sources to our notebook, use them for inference in the competition, and remain within the rules?</p>",
      "rawMarkdown": "Hi all,\n\nApologies if it's been asked already, but can someone please clarify this section of the \"Code Competition\" [rules](www.kaggle.com/competitions/hms-harmful-brain-activity-classification/overview/code-requirements):\n\n- Freely & publicly available external data is allowed, including pre-trained models\n\nI initially took this to mean that you can use pre-trained models that are freely & publicly available, but after digging around to past competitions, I now understand it means that private model training is typically done offline, and the allotted 9 hours for CPU/GPU time in the notebook is simply for inference on the test data and postprocessing.  \n\nIn support of this conclusion, see [this discussion](https://www.kaggle.com/competitions/feedback-prize-2021/discussion/313177), where the 1st-place submission mentions needing to train offline since Kaggle \"online resources are insufficient\".\nThe Code Requirements section of the associated competition is nearly identical to ours:\nwww.kaggle.com/competitions/feedback-prize-2021/overview/code-requirements\n\nWith that info, can someone please answer that definitively, yes, we can privately train our models offline, upload them as data sources to our notebook, use them for inference in the competition, and remain within the rules?",
      "votes": null
    },
    {
      "id": "2643061",
      "postDate": "02/08/2024 15:38:34",
      "content": "<p>You are right. We can</p>",
      "rawMarkdown": "You are right. We can",
      "votes": null
    },
    {
      "id": "2643066",
      "postDate": "02/08/2024 15:42:41",
      "content": "<p>Thank you!</p>",
      "rawMarkdown": "Thank you!",
      "votes": null
    },
    {
      "id": "2643108",
      "postDate": "02/08/2024 16:11:32",
      "content": "<p>It would put some worries to rest to have a reply from Kaggle staff or a competition host confirming the same.  Thanks!</p>",
      "rawMarkdown": "It would put some worries to rest to have a reply from Kaggle staff or a competition host confirming the same.  Thanks!",
      "votes": null
    },
    {
      "id": "2643234",
      "postDate": "02/08/2024 18:01:01",
      "content": "<p>Pretty much the same question asked in 100+ competitions that I have been in over the years.  As noted by <a href=\"https://www.kaggle.com/samson8\" target=\"_blank\">samson</a> - we can - No Worries.</p>\n<p>Maybe kaggle can rework the wording for future competitions?</p>",
      "rawMarkdown": "Pretty much the same question asked in 100+ competitions that I have been in over the years.  As noted by [samson](https://www.kaggle.com/samson8) - we can - No Worries.\n\nMaybe kaggle can rework the wording for future competitions?",
      "votes": null
    },
    {
      "id": "2643291",
      "postDate": "02/08/2024 18:35:42",
      "content": "<p>I agree that a rewording would clear up the confusion.  Switching from </p>\n<ul>\n<li>Freely &amp; publicly available external data is allowed, including pre-trained models</li>\n</ul>\n<p>to</p>\n<ul>\n<li>Freely &amp; publicly available external data is allowed</li>\n<li>Your pre-trained models are allowed</li>\n</ul>\n<p>is a simple way to clear up the confusion.</p>",
      "rawMarkdown": "I agree that a rewording would clear up the confusion.  Switching from \n- Freely & publicly available external data is allowed, including pre-trained models\n\nto\n\n- Freely & publicly available external data is allowed\n- Your pre-trained models are allowed\n\nis a simple way to clear up the confusion.",
      "votes": null
    },
    {
      "id": "2643443",
      "postDate": "02/08/2024 20:41:20",
      "content": "<p>It actually says nothing about the models we train. When we train a model we <strong>finetune</strong> a model. A <strong>pretrained</strong> model is the model that we download from Hugging Face or Timm.</p>\n<p>(And just to confirm. I agree with PC Jimmy. It is allowed for us to train a model offline and upload to Kaggle dataset for inference).</p>\n<p>======<br>\nA model from Hugging Face has been pretrained on millions of images from the imagenet dataset and others. So this is saying that it is ok for us to use any external dataset that is public (to pretrain with, finetune with, or train from scratch with). And we can use any model from Hugging Face or Timm which has been pretrained on an external dataset (like imagenet) and been made public.</p>",
      "rawMarkdown": "It actually says nothing about the models we train. When we train a model we **finetune** a model. A **pretrained** model is the model that we download from Hugging Face or Timm.\n\n(And just to confirm. I agree with PC Jimmy. It is allowed for us to train a model offline and upload to Kaggle dataset for inference).\n\n======\nA model from Hugging Face has been pretrained on millions of images from the imagenet dataset and others. So this is saying that it is ok for us to use any external dataset that is public (to pretrain with, finetune with, or train from scratch with). And we can use any model from Hugging Face or Timm which has been pretrained on an external dataset (like imagenet) and been made public.",
      "votes": null
    },
    {
      "id": "2643483",
      "postDate": "02/08/2024 21:11:27",
      "content": "<p>Ah, that's exactly their intended meaning of \"pretrained\".  I had not thought of that.</p>\n<p>In an older competition  (<a href=\"https://www.kaggle.com/c/jane-street-market-prediction/overview/code-requirements\" target=\"_blank\">Jane Street Market Prediction competition</a>), they explicitly stated \"For this competition, training is not required in Notebooks.\".</p>\n<p>That omission from our own competition rules was another reason I was wondering if something had changed.  </p>\n<p>Anyway, thanks!</p>",
      "rawMarkdown": "Ah, that's exactly their intended meaning of \"pretrained\".  I had not thought of that.\n\nIn an older competition  ([Jane Street Market Prediction competition](https://www.kaggle.com/c/jane-street-market-prediction/overview/code-requirements)), they explicitly stated \"For this competition, training is not required in Notebooks.\".\n\nThat omission from our own competition rules was another reason I was wondering if something had changed.  \n\nAnyway, thanks!",
      "votes": null
    },
    {
      "id": "2650687",
      "postDate": "02/13/2024 16:26:31",
      "content": "<p>Hi, I'm a little confused, does this mean that we can train a model for much longer than 9 hours? In other words, we only need less than 9 hours for inference and don’t need to pay attention to the time of model training?</p>",
      "rawMarkdown": "Hi, I'm a little confused, does this mean that we can train a model for much longer than 9 hours? In other words, we only need less than 9 hours for inference and don’t need to pay attention to the time of model training?",
      "votes": null
    },
    {
      "id": "2650731",
      "postDate": "02/13/2024 17:10:07",
      "content": "<blockquote>\n  <p>In other words, we only need less than 9 hours for inference and don’t need to pay attention to the time of model training?</p>\n</blockquote>\n<p>This is correct.</p>",
      "rawMarkdown": "> In other words, we only need less than 9 hours for inference and don’t need to pay attention to the time of model training?\n\nThis is correct.",
      "votes": null
    },
    {
      "id": "2650750",
      "postDate": "02/13/2024 17:25:17",
      "content": "<p>Nice! Thank for your reply.</p>",
      "rawMarkdown": "Nice! Thank for your reply.",
      "votes": null
    },
    {
      "id": "2679930",
      "postDate": "03/03/2024 20:21:57",
      "content": "<p>Thank you so much everyone for clarifying this as I was really confused as this is my first code competition.</p>",
      "rawMarkdown": "Thank you so much everyone for clarifying this as I was really confused as this is my first code competition.",
      "votes": null
    },
    {
      "id": "2762752",
      "postDate": "04/20/2024 04:34:10",
      "content": "<p>This is really confusing. I thought the whole point of a code competition was to limit the compute that could be spent. That it has to run in under 9 hours on the available compute. Someone mentioned that this question has been asked 100 times. This is the only one I have found through searching discord. What is the point of a code competition then ? </p>",
      "rawMarkdown": "This is really confusing. I thought the whole point of a code competition was to limit the compute that could be spent. That it has to run in under 9 hours on the available compute. Someone mentioned that this question has been asked 100 times. This is the only one I have found through searching discord. What is the point of a code competition then ?",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 2643061,
      "author_name": "samson8",
      "author_url": "",
      "post_date": "02/08/2024 15:38:34",
      "content": "<p>You are right. We can</p>",
      "votes": null,
      "replies": [
        {
          "id": 2643066,
          "author_name": "nathanhammes1",
          "author_url": "",
          "post_date": "02/08/2024 15:42:41",
          "content": "<p>Thank you!</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 2643108,
      "author_name": "nathanhammes1",
      "author_url": "",
      "post_date": "02/08/2024 16:11:32",
      "content": "<p>It would put some worries to rest to have a reply from Kaggle staff or a competition host confirming the same.  Thanks!</p>",
      "votes": null,
      "replies": [
        {
          "id": 2643234,
          "author_name": "pcjimmmy",
          "author_url": "",
          "post_date": "02/08/2024 18:01:01",
          "content": "<p>Pretty much the same question asked in 100+ competitions that I have been in over the years.  As noted by <a href=\"https://www.kaggle.com/samson8\" target=\"_blank\">samson</a> - we can - No Worries.</p>\n<p>Maybe kaggle can rework the wording for future competitions?</p>",
          "votes": null,
          "replies": [
            {
              "id": 2643291,
              "author_name": "nathanhammes1",
              "author_url": "",
              "post_date": "02/08/2024 18:35:42",
              "content": "<p>I agree that a rewording would clear up the confusion.  Switching from </p>\n<ul>\n<li>Freely &amp; publicly available external data is allowed, including pre-trained models</li>\n</ul>\n<p>to</p>\n<ul>\n<li>Freely &amp; publicly available external data is allowed</li>\n<li>Your pre-trained models are allowed</li>\n</ul>\n<p>is a simple way to clear up the confusion.</p>",
              "votes": null,
              "replies": [
                {
                  "id": 2643443,
                  "author_name": "cdeotte",
                  "author_url": "",
                  "post_date": "02/08/2024 20:41:20",
                  "content": "<p>It actually says nothing about the models we train. When we train a model we <strong>finetune</strong> a model. A <strong>pretrained</strong> model is the model that we download from Hugging Face or Timm.</p>\n<p>(And just to confirm. I agree with PC Jimmy. It is allowed for us to train a model offline and upload to Kaggle dataset for inference).</p>\n<p>======<br>\nA model from Hugging Face has been pretrained on millions of images from the imagenet dataset and others. So this is saying that it is ok for us to use any external dataset that is public (to pretrain with, finetune with, or train from scratch with). And we can use any model from Hugging Face or Timm which has been pretrained on an external dataset (like imagenet) and been made public.</p>",
                  "votes": null,
                  "replies": [
                    {
                      "id": 2643483,
                      "author_name": "nathanhammes1",
                      "author_url": "",
                      "post_date": "02/08/2024 21:11:27",
                      "content": "<p>Ah, that's exactly their intended meaning of \"pretrained\".  I had not thought of that.</p>\n<p>In an older competition  (<a href=\"https://www.kaggle.com/c/jane-street-market-prediction/overview/code-requirements\" target=\"_blank\">Jane Street Market Prediction competition</a>), they explicitly stated \"For this competition, training is not required in Notebooks.\".</p>\n<p>That omission from our own competition rules was another reason I was wondering if something had changed.  </p>\n<p>Anyway, thanks!</p>",
                      "votes": null,
                      "replies": []
                    },
                    {
                      "id": 2650687,
                      "author_name": "zechengli19",
                      "author_url": "",
                      "post_date": "02/13/2024 16:26:31",
                      "content": "<p>Hi, I'm a little confused, does this mean that we can train a model for much longer than 9 hours? In other words, we only need less than 9 hours for inference and don’t need to pay attention to the time of model training?</p>",
                      "votes": null,
                      "replies": [
                        {
                          "id": 2650731,
                          "author_name": "cdeotte",
                          "author_url": "",
                          "post_date": "02/13/2024 17:10:07",
                          "content": "<blockquote>\n  <p>In other words, we only need less than 9 hours for inference and don’t need to pay attention to the time of model training?</p>\n</blockquote>\n<p>This is correct.</p>",
                          "votes": null,
                          "replies": [
                            {
                              "id": 2650750,
                              "author_name": "zechengli19",
                              "author_url": "",
                              "post_date": "02/13/2024 17:25:17",
                              "content": "<p>Nice! Thank for your reply.</p>",
                              "votes": null,
                              "replies": []
                            }
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    },
    {
      "id": 2679930,
      "author_name": "vishalbakshi",
      "author_url": "",
      "post_date": "03/03/2024 20:21:57",
      "content": "<p>Thank you so much everyone for clarifying this as I was really confused as this is my first code competition.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 2762752,
      "author_name": "corey4",
      "author_url": "",
      "post_date": "04/20/2024 04:34:10",
      "content": "<p>This is really confusing. I thought the whole point of a code competition was to limit the compute that could be spent. That it has to run in under 9 hours on the available compute. Someone mentioned that this question has been asked 100 times. This is the only one I have found through searching discord. What is the point of a code competition then ? </p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "2643002": "Hi all,\n\nApologies if it's been asked already, but can someone please clarify this section of the \"Code Competition\" [rules](www.kaggle.com/competitions/hms-harmful-brain-activity-classification/overview/code-requirements):\n\n- Freely & publicly available external data is allowed, including pre-trained models\n\nI initially took this to mean that you can use pre-trained models that are freely & publicly available, but after digging around to past competitions, I now understand it means that private model training is typically done offline, and the allotted 9 hours for CPU/GPU time in the notebook is simply for inference on the test data and postprocessing.  \n\nIn support of this conclusion, see [this discussion](https://www.kaggle.com/competitions/feedback-prize-2021/discussion/313177), where the 1st-place submission mentions needing to train offline since Kaggle \"online resources are insufficient\".\nThe Code Requirements section of the associated competition is nearly identical to ours:\nwww.kaggle.com/competitions/feedback-prize-2021/overview/code-requirements\n\nWith that info, can someone please answer that definitively, yes, we can privately train our models offline, upload them as data sources to our notebook, use them for inference in the competition, and remain within the rules?",
    "2643061": "You are right. We can",
    "2643066": "Thank you!",
    "2643108": "It would put some worries to rest to have a reply from Kaggle staff or a competition host confirming the same.  Thanks!",
    "2643234": "Pretty much the same question asked in 100+ competitions that I have been in over the years.  As noted by [samson](https://www.kaggle.com/samson8) - we can - No Worries.\n\nMaybe kaggle can rework the wording for future competitions?",
    "2643291": "I agree that a rewording would clear up the confusion.  Switching from \n- Freely & publicly available external data is allowed, including pre-trained models\n\nto\n\n- Freely & publicly available external data is allowed\n- Your pre-trained models are allowed\n\nis a simple way to clear up the confusion.",
    "2643443": "It actually says nothing about the models we train. When we train a model we **finetune** a model. A **pretrained** model is the model that we download from Hugging Face or Timm.\n\n(And just to confirm. I agree with PC Jimmy. It is allowed for us to train a model offline and upload to Kaggle dataset for inference).\n\n======\nA model from Hugging Face has been pretrained on millions of images from the imagenet dataset and others. So this is saying that it is ok for us to use any external dataset that is public (to pretrain with, finetune with, or train from scratch with). And we can use any model from Hugging Face or Timm which has been pretrained on an external dataset (like imagenet) and been made public.",
    "2643483": "Ah, that's exactly their intended meaning of \"pretrained\".  I had not thought of that.\n\nIn an older competition  ([Jane Street Market Prediction competition](https://www.kaggle.com/c/jane-street-market-prediction/overview/code-requirements)), they explicitly stated \"For this competition, training is not required in Notebooks.\".\n\nThat omission from our own competition rules was another reason I was wondering if something had changed.  \n\nAnyway, thanks!",
    "2650687": "Hi, I'm a little confused, does this mean that we can train a model for much longer than 9 hours? In other words, we only need less than 9 hours for inference and don’t need to pay attention to the time of model training?",
    "2650731": "> In other words, we only need less than 9 hours for inference and don’t need to pay attention to the time of model training?\n\nThis is correct.",
    "2650750": "Nice! Thank for your reply.",
    "2679930": "Thank you so much everyone for clarifying this as I was really confused as this is my first code competition.",
    "2762752": "This is really confusing. I thought the whole point of a code competition was to limit the compute that could be spent. That it has to run in under 9 hours on the available compute. Someone mentioned that this question has been asked 100 times. This is the only one I have found through searching discord. What is the point of a code competition then ?"
  },
  "source": "meta"
}