{
  "id": 507487,
  "title": "ROOKIE needs HELP!!!!!! THX",
  "url": "/competitions/birdclef-2024/discussion/507487",
  "author_name": "",
  "post_date": "2024-05-26T03:39:08.046911700Z",
  "votes": null,
  "comment_count": 7,
  "views": 0,
  "content": "<p>Hey guys, this is my first time to Kaggle. I have a question.<br>\nCan I separate my training code and testing code into 2 notebooks?<br>\nIf I can, how should i save my model weights and then use it in my testing code??<br>\npls help me, thank you veryyyyyyyyy much</p>",
  "messages": [
    {
      "id": "2836647",
      "postDate": "05/26/2024 03:39:08",
      "content": "<p>Hey guys, this is my first time to Kaggle. I have a question.<br>\nCan I separate my training code and testing code into 2 notebooks?<br>\nIf I can, how should i save my model weights and then use it in my testing code??<br>\npls help me, thank you veryyyyyyyyy much</p>",
      "rawMarkdown": "Hey guys, this is my first time to Kaggle. I have a question.\nCan I separate my training code and testing code into 2 notebooks?\nIf I can, how should i save my model weights and then use it in my testing code??\npls help me, thank you veryyyyyyyyy much",
      "votes": null
    },
    {
      "id": "2836687",
      "postDate": "05/26/2024 04:30:48",
      "content": "<p>While training, save your model with torch.save.</p>\n<p>When you are running inference / testing notebook, you can add your training notebook's output as a dataset as use that.</p>",
      "rawMarkdown": "While training, save your model with torch.save.\n\nWhen you are running inference / testing notebook, you can add your training notebook's output as a dataset as use that.",
      "votes": null
    },
    {
      "id": "2836768",
      "postDate": "05/26/2024 05:41:04",
      "content": "<p>Thank you Salman Ahmed, i'm wondeing when i use torch.save, should i add any address? (for example:  r'\\kaggle\\output' ?)</p>",
      "rawMarkdown": "Thank you Salman Ahmed, i'm wondeing when i use torch.save, should i add any address? (for example:  r'\\kaggle\\output' ?)",
      "votes": null
    },
    {
      "id": "2837398",
      "postDate": "05/26/2024 13:13:24",
      "content": "<p>You can even train your model off kaggle (on your pc) and upload the pretrained model (by creating a private model set on kaggle). Then using an inference notebook on kaggle to submit. Hope I'm right because I asked the same question on kaggle's discord. 🙂</p>",
      "rawMarkdown": "You can even train your model off kaggle (on your pc) and upload the pretrained model (by creating a private model set on kaggle). Then using an inference notebook on kaggle to submit. Hope I'm right because I asked the same question on kaggle's discord. 🙂",
      "votes": null
    },
    {
      "id": "2837469",
      "postDate": "05/26/2024 14:09:24",
      "content": "<p>Thank you very much, I will try this method!!!!!😄👍</p>",
      "rawMarkdown": "Thank you very much, I will try this method!!!!!😄👍",
      "votes": null
    },
    {
      "id": "2837801",
      "postDate": "05/26/2024 17:18:22",
      "content": "<p>Yes, you have to say where you put what you save. Just save in current directory, i.e. use \".\".  It will be in the output of your notebook and you can use it as data source.</p>",
      "rawMarkdown": "Yes, you have to say where you put what you save. Just save in current directory, i.e. use \".\".  It will be in the output of your notebook and you can use it as data source.",
      "votes": null
    },
    {
      "id": "2838448",
      "postDate": "05/27/2024 03:37:16",
      "content": "<p>Thank you, it helps me a lot.!!</p>",
      "rawMarkdown": "Thank you, it helps me a lot.!!",
      "votes": null
    },
    {
      "id": "2844729",
      "postDate": "05/30/2024 08:00:14",
      "content": "<p>On Kaggle the output directory is <code>/kaggle/working</code></p>",
      "rawMarkdown": "On Kaggle the output directory is `/kaggle/working`",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 2836687,
      "author_name": "salmanahmedtamu",
      "author_url": "",
      "post_date": "05/26/2024 04:30:48",
      "content": "<p>While training, save your model with torch.save.</p>\n<p>When you are running inference / testing notebook, you can add your training notebook's output as a dataset as use that.</p>",
      "votes": null,
      "replies": [
        {
          "id": 2836768,
          "author_name": "chingnengliao",
          "author_url": "",
          "post_date": "05/26/2024 05:41:04",
          "content": "<p>Thank you Salman Ahmed, i'm wondeing when i use torch.save, should i add any address? (for example:  r'\\kaggle\\output' ?)</p>",
          "votes": null,
          "replies": [
            {
              "id": 2837801,
              "author_name": "cpmpml",
              "author_url": "",
              "post_date": "05/26/2024 17:18:22",
              "content": "<p>Yes, you have to say where you put what you save. Just save in current directory, i.e. use \".\".  It will be in the output of your notebook and you can use it as data source.</p>",
              "votes": null,
              "replies": [
                {
                  "id": 2838448,
                  "author_name": "chingnengliao",
                  "author_url": "",
                  "post_date": "05/27/2024 03:37:16",
                  "content": "<p>Thank you, it helps me a lot.!!</p>",
                  "votes": null,
                  "replies": []
                }
              ]
            },
            {
              "id": 2844729,
              "author_name": "atamazian",
              "author_url": "",
              "post_date": "05/30/2024 08:00:14",
              "content": "<p>On Kaggle the output directory is <code>/kaggle/working</code></p>",
              "votes": null,
              "replies": []
            }
          ]
        }
      ]
    },
    {
      "id": 2837398,
      "author_name": "sakurayuyuko",
      "author_url": "",
      "post_date": "05/26/2024 13:13:24",
      "content": "<p>You can even train your model off kaggle (on your pc) and upload the pretrained model (by creating a private model set on kaggle). Then using an inference notebook on kaggle to submit. Hope I'm right because I asked the same question on kaggle's discord. 🙂</p>",
      "votes": null,
      "replies": [
        {
          "id": 2837469,
          "author_name": "chingnengliao",
          "author_url": "",
          "post_date": "05/26/2024 14:09:24",
          "content": "<p>Thank you very much, I will try this method!!!!!😄👍</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "2836647": "Hey guys, this is my first time to Kaggle. I have a question.\nCan I separate my training code and testing code into 2 notebooks?\nIf I can, how should i save my model weights and then use it in my testing code??\npls help me, thank you veryyyyyyyyy much",
    "2836687": "While training, save your model with torch.save.\n\nWhen you are running inference / testing notebook, you can add your training notebook's output as a dataset as use that.",
    "2836768": "Thank you Salman Ahmed, i'm wondeing when i use torch.save, should i add any address? (for example:  r'\\kaggle\\output' ?)",
    "2837398": "You can even train your model off kaggle (on your pc) and upload the pretrained model (by creating a private model set on kaggle). Then using an inference notebook on kaggle to submit. Hope I'm right because I asked the same question on kaggle's discord. 🙂",
    "2837469": "Thank you very much, I will try this method!!!!!😄👍",
    "2837801": "Yes, you have to say where you put what you save. Just save in current directory, i.e. use \".\".  It will be in the output of your notebook and you can use it as data source.",
    "2838448": "Thank you, it helps me a lot.!!",
    "2844729": "On Kaggle the output directory is `/kaggle/working`"
  },
  "source": "meta"
}