{
  "id": 448010,
  "title": "Don't Train During Inference?",
  "url": "/competitions/UBC-OCEAN/discussion/448010",
  "author_name": "Raheem Nasirudeen",
  "post_date": "2023-10-18T05:28:06.735000",
  "votes": 1,
  "comment_count": 6,
  "views": 0,
  "content": "<p>I seems not to get, what the competitors mean, by this statement. Any one to show me a practical example, will be highly appreciated. Thanks.</p>",
  "messages": [
    {
      "id": 2486992,
      "postDate": "2023-10-18T09:37:36.087Z",
      "content": "<p>This means, that you have to create two separate notebooks. One for training the model, and one for inference from the trained model.<br>\nA basic workflow would be - Make a notebook, develop a model and train it in the notebook, and save it as a binary file. <br>\nMake a second notebook, and import the training notebook as a data source and load the model. Use the loaded model to infer on the test data, and submit to the competition. Here are a few examples from this competition:</p>\n<ol>\n<li><p>By pjmathematician (me):<br>\nTraining : <a href=\"https://www.kaggle.com/code/pjmathematician/ubco-keras-cnn-baseline-thumbnails-training\" target=\"_blank\">https://www.kaggle.com/code/pjmathematician/ubco-keras-cnn-baseline-thumbnails-training</a><br>\nInference : <a href=\"https://www.kaggle.com/code/pjmathematician/ubco-keras-cnn-baseline-thumbnails-inference\" target=\"_blank\">https://www.kaggle.com/code/pjmathematician/ubco-keras-cnn-baseline-thumbnails-inference</a></p></li>\n<li><p>By motono0223 : <br>\nTraining : <a href=\"https://www.kaggle.com/code/motono0223/ubc-pytorch-cnn-training-fold1of5\" target=\"_blank\">https://www.kaggle.com/code/motono0223/ubc-pytorch-cnn-training-fold1of5</a><br>\nInference : <a href=\"https://www.kaggle.com/code/motono0223/ubc-pytorch-cnn-inference\" target=\"_blank\">https://www.kaggle.com/code/motono0223/ubc-pytorch-cnn-inference</a></p></li>\n<li><p>By JIRKA BOROVEC : <br>\nTraining : <a href=\"https://www.kaggle.com/code/jirkaborovec/cancer-subtype-baseline-with-lightning-timm\" target=\"_blank\">https://www.kaggle.com/code/jirkaborovec/cancer-subtype-baseline-with-lightning-timm</a><br>\nInference : <a href=\"https://www.kaggle.com/code/jirkaborovec/cancer-subtype-lightning-torch-inference\" target=\"_blank\">https://www.kaggle.com/code/jirkaborovec/cancer-subtype-lightning-torch-inference</a></p></li>\n</ol>\n<p>Hope this helps! Goodluck for the competition!</p>",
      "rawMarkdown": "This means, that you have to create two separate notebooks. One for training the model, and one for inference from the trained model.\nA basic workflow would be - Make a notebook, develop a model and train it in the notebook, and save it as a binary file. \nMake a second notebook, and import the training notebook as a data source and load the model. Use the loaded model to infer on the test data, and submit to the competition. Here are a few examples from this competition:\n\n1. By pjmathematician (me):\nTraining : https://www.kaggle.com/code/pjmathematician/ubco-keras-cnn-baseline-thumbnails-training\nInference : https://www.kaggle.com/code/pjmathematician/ubco-keras-cnn-baseline-thumbnails-inference\n\n2. By motono0223 : \nTraining : https://www.kaggle.com/code/motono0223/ubc-pytorch-cnn-training-fold1of5\nInference : https://www.kaggle.com/code/motono0223/ubc-pytorch-cnn-inference\n\n3. By JIRKA BOROVEC : \nTraining : https://www.kaggle.com/code/jirkaborovec/cancer-subtype-baseline-with-lightning-timm\nInference : https://www.kaggle.com/code/jirkaborovec/cancer-subtype-lightning-torch-inference\n\nHope this helps! Goodluck for the competition!",
      "votes": 5,
      "replies": [
        {
          "id": 2487129,
          "postDate": "2023-10-18T11:43:36.397Z",
          "content": "<p>Thanks so much, for the guide.</p>",
          "rawMarkdown": "Thanks so much, for the guide.",
          "replies": [
            {
              "id": 2488530,
              "postDate": "2023-10-19T09:57:39.277Z",
              "content": "<p>I trained my model on my own server and load it as a dataset.There is still a large gape between RTX4090 <br>\nand P100.<br>\nI think it can save a lot of time. </p>",
              "rawMarkdown": "I trained my model on my own server and load it as a dataset.There is still a large gape between RTX4090 \nand P100.\nI think it can save a lot of time. "
            },
            {
              "id": 2488560,
              "postDate": "2023-10-19T10:49:50.770Z",
              "content": "<p>Yeah， My server is just fine，but I got a “threw exception” error in kaggle😭</p>",
              "rawMarkdown": "Yeah， My server is just fine，but I got a “threw exception” error in kaggle😭"
            },
            {
              "id": 2488616,
              "postDate": "2023-10-19T11:25:32.603Z",
              "rawMarkdown": "",
              "isDeleted": true
            },
            {
              "id": 2488741,
              "postDate": "2023-10-19T13:10:52.953Z",
              "content": "<p>Yes,after waiting for 2hours I get “Notebook Out of Memory”,you know it is really terrible.<br>\nI'm trying to use this idea in my submission<a href=\"url\" target=\"_blank\">https://www.kaggle.com/code/sunilthite/ubc-ocean-testing-data-prediction</a>,but I faced “Notebook Out of Memory”.</p>",
              "rawMarkdown": "Yes,after waiting for 2hours I get “Notebook Out of Memory”,you know it is really terrible.\nI'm trying to use this idea in my submission[https://www.kaggle.com/code/sunilthite/ubc-ocean-testing-data-prediction](url),but I faced “Notebook Out of Memory”."
            }
          ]
        }
      ]
    },
    {
      "id": 2486683,
      "postDate": "2023-10-18T05:28:06.737Z",
      "content": "<p>I seems not to get, what the competitors mean, by this statement. Any one to show me a practical example, will be highly appreciated. Thanks.</p>",
      "rawMarkdown": "I seems not to get, what the competitors mean, by this statement. Any one to show me a practical example, will be highly appreciated. Thanks.",
      "votes": 1
    }
  ],
  "comments": [
    {
      "id": 2486992,
      "author_name": "pjmathematician",
      "author_url": "",
      "post_date": "2023-10-18T09:37:36.087000",
      "content": "<p>This means, that you have to create two separate notebooks. One for training the model, and one for inference from the trained model.<br>\nA basic workflow would be - Make a notebook, develop a model and train it in the notebook, and save it as a binary file. <br>\nMake a second notebook, and import the training notebook as a data source and load the model. Use the loaded model to infer on the test data, and submit to the competition. Here are a few examples from this competition:</p>\n<ol>\n<li><p>By pjmathematician (me):<br>\nTraining : <a href=\"https://www.kaggle.com/code/pjmathematician/ubco-keras-cnn-baseline-thumbnails-training\" target=\"_blank\">https://www.kaggle.com/code/pjmathematician/ubco-keras-cnn-baseline-thumbnails-training</a><br>\nInference : <a href=\"https://www.kaggle.com/code/pjmathematician/ubco-keras-cnn-baseline-thumbnails-inference\" target=\"_blank\">https://www.kaggle.com/code/pjmathematician/ubco-keras-cnn-baseline-thumbnails-inference</a></p></li>\n<li><p>By motono0223 : <br>\nTraining : <a href=\"https://www.kaggle.com/code/motono0223/ubc-pytorch-cnn-training-fold1of5\" target=\"_blank\">https://www.kaggle.com/code/motono0223/ubc-pytorch-cnn-training-fold1of5</a><br>\nInference : <a href=\"https://www.kaggle.com/code/motono0223/ubc-pytorch-cnn-inference\" target=\"_blank\">https://www.kaggle.com/code/motono0223/ubc-pytorch-cnn-inference</a></p></li>\n<li><p>By JIRKA BOROVEC : <br>\nTraining : <a href=\"https://www.kaggle.com/code/jirkaborovec/cancer-subtype-baseline-with-lightning-timm\" target=\"_blank\">https://www.kaggle.com/code/jirkaborovec/cancer-subtype-baseline-with-lightning-timm</a><br>\nInference : <a href=\"https://www.kaggle.com/code/jirkaborovec/cancer-subtype-lightning-torch-inference\" target=\"_blank\">https://www.kaggle.com/code/jirkaborovec/cancer-subtype-lightning-torch-inference</a></p></li>\n</ol>\n<p>Hope this helps! Goodluck for the competition!</p>",
      "votes": 5,
      "replies": [
        {
          "id": 2487129,
          "author_name": "Raheem Nasirudeen",
          "author_url": "",
          "post_date": "2023-10-18T11:43:36.397000",
          "content": "<p>Thanks so much, for the guide.</p>",
          "votes": 0,
          "replies": [
            {
              "id": 2488530,
              "author_name": "LuoZiqian",
              "author_url": "",
              "post_date": "2023-10-19T09:57:39.277000",
              "content": "<p>I trained my model on my own server and load it as a dataset.There is still a large gape between RTX4090 <br>\nand P100.<br>\nI think it can save a lot of time. </p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 2488560,
              "author_name": "Seeing Times",
              "author_url": "",
              "post_date": "2023-10-19T10:49:50.770000",
              "content": "<p>Yeah， My server is just fine，but I got a “threw exception” error in kaggle😭</p>",
              "votes": 0,
              "replies": []
            },
            {
              "id": 2488616,
              "author_name": "",
              "author_url": "",
              "post_date": "2023-10-19T11:25:32.603000",
              "content": "",
              "votes": 0,
              "replies": []
            },
            {
              "id": 2488741,
              "author_name": "LuoZiqian",
              "author_url": "",
              "post_date": "2023-10-19T13:10:52.953000",
              "content": "<p>Yes,after waiting for 2hours I get “Notebook Out of Memory”,you know it is really terrible.<br>\nI'm trying to use this idea in my submission<a href=\"url\" target=\"_blank\">https://www.kaggle.com/code/sunilthite/ubc-ocean-testing-data-prediction</a>,but I faced “Notebook Out of Memory”.</p>",
              "votes": 0,
              "replies": []
            }
          ]
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "2486992": "This means, that you have to create two separate notebooks. One for training the model, and one for inference from the trained model.\nA basic workflow would be - Make a notebook, develop a model and train it in the notebook, and save it as a binary file. \nMake a second notebook, and import the training notebook as a data source and load the model. Use the loaded model to infer on the test data, and submit to the competition. Here are a few examples from this competition:\n\n1. By pjmathematician (me):\nTraining : https://www.kaggle.com/code/pjmathematician/ubco-keras-cnn-baseline-thumbnails-training\nInference : https://www.kaggle.com/code/pjmathematician/ubco-keras-cnn-baseline-thumbnails-inference\n\n2. By motono0223 : \nTraining : https://www.kaggle.com/code/motono0223/ubc-pytorch-cnn-training-fold1of5\nInference : https://www.kaggle.com/code/motono0223/ubc-pytorch-cnn-inference\n\n3. By JIRKA BOROVEC : \nTraining : https://www.kaggle.com/code/jirkaborovec/cancer-subtype-baseline-with-lightning-timm\nInference : https://www.kaggle.com/code/jirkaborovec/cancer-subtype-lightning-torch-inference\n\nHope this helps! Goodluck for the competition!",
    "2486683": "I seems not to get, what the competitors mean, by this statement. Any one to show me a practical example, will be highly appreciated. Thanks."
  }
}