{
  "id": 542269,
  "title": "How to start the server before the 15min limit?",
  "url": "/competitions/jane-street-real-time-market-data-forecasting/discussion/542269",
  "author_name": "",
  "post_date": "2024-10-23T23:58:27.238694400Z",
  "votes": null,
  "comment_count": 3,
  "views": 0,
  "content": "<p>Hi fellow Kagglers, I am having a notebook inference server error and it looks like it takes more than 15min during model training in my submission. Jane Street staff suggest \"If you need more than 15 minutes to load your model you can do so during the very first predict call, which does not have the usual 10 minute response deadline.\" But how do I do that exactly? Any input is appreciated, thank you!</p>",
  "messages": [
    {
      "id": "3026535",
      "postDate": "10/23/2024 23:58:27",
      "content": "<p>Hi fellow Kagglers, I am having a notebook inference server error and it looks like it takes more than 15min during model training in my submission. Jane Street staff suggest \"If you need more than 15 minutes to load your model you can do so during the very first predict call, which does not have the usual 10 minute response deadline.\" But how do I do that exactly? Any input is appreciated, thank you!</p>",
      "rawMarkdown": "Hi fellow Kagglers, I am having a notebook inference server error and it looks like it takes more than 15min during model training in my submission. Jane Street staff suggest \"If you need more than 15 minutes to load your model you can do so during the very first predict call, which does not have the usual 10 minute response deadline.\" But how do I do that exactly? Any input is appreciated, thank you!",
      "votes": null
    },
    {
      "id": "3026873",
      "postDate": "10/24/2024 10:04:36",
      "content": "<p>I would create a global variable for your predictor and instantiate it in the first use of the <code>predict</code> function with something like:</p>\n<pre><code> () -&gt; pl.DataFrame:\n     model_predictor\n     model_predictor  :\n        \n</code></pre>",
      "rawMarkdown": "I would create a global variable for your predictor and instantiate it in the first use of the `predict` function with something like:\n\n```\ndef predict(test: pl.DataFrame, lags: pl.DataFrame | None) -> pl.DataFrame:\n    global model_predictor\n    if model_predictor is None:\n        # load your predictor here\n```",
      "votes": null
    },
    {
      "id": "3028329",
      "postDate": "10/25/2024 21:42:07",
      "content": "<p>Thank you for your response! Can you elaborate a bit more on that? Does this mean that before I train my model, I call the  inference_server.serve() with a dummy predict function and call it again when I finish training? </p>",
      "rawMarkdown": "Thank you for your response! Can you elaborate a bit more on that? Does this mean that before I train my model, I call the  inference_server.serve() with a dummy predict function and call it again when I finish training?",
      "votes": null
    },
    {
      "id": "3037820",
      "postDate": "11/06/2024 07:54:33",
      "content": "<p>don't write predict function, don't call inference. save your model then do commit and save. then open kaggle homepage go to datasets on left panel. click new dataset and save your model as dataset. then in new notebook use this datset to load model and directly call inference.</p>",
      "rawMarkdown": "don't write predict function, don't call inference. save your model then do commit and save. then open kaggle homepage go to datasets on left panel. click new dataset and save your model as dataset. then in new notebook use this datset to load model and directly call inference.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 3026873,
      "author_name": "alexandermilanovic",
      "author_url": "",
      "post_date": "10/24/2024 10:04:36",
      "content": "<p>I would create a global variable for your predictor and instantiate it in the first use of the <code>predict</code> function with something like:</p>\n<pre><code> () -&gt; pl.DataFrame:\n     model_predictor\n     model_predictor  :\n        \n</code></pre>",
      "votes": null,
      "replies": [
        {
          "id": 3028329,
          "author_name": "qinyanghe",
          "author_url": "",
          "post_date": "10/25/2024 21:42:07",
          "content": "<p>Thank you for your response! Can you elaborate a bit more on that? Does this mean that before I train my model, I call the  inference_server.serve() with a dummy predict function and call it again when I finish training? </p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 3037820,
      "author_name": "meetbabariya",
      "author_url": "",
      "post_date": "11/06/2024 07:54:33",
      "content": "<p>don't write predict function, don't call inference. save your model then do commit and save. then open kaggle homepage go to datasets on left panel. click new dataset and save your model as dataset. then in new notebook use this datset to load model and directly call inference.</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "3026535": "Hi fellow Kagglers, I am having a notebook inference server error and it looks like it takes more than 15min during model training in my submission. Jane Street staff suggest \"If you need more than 15 minutes to load your model you can do so during the very first predict call, which does not have the usual 10 minute response deadline.\" But how do I do that exactly? Any input is appreciated, thank you!",
    "3026873": "I would create a global variable for your predictor and instantiate it in the first use of the `predict` function with something like:\n\n```\ndef predict(test: pl.DataFrame, lags: pl.DataFrame | None) -> pl.DataFrame:\n    global model_predictor\n    if model_predictor is None:\n        # load your predictor here\n```",
    "3028329": "Thank you for your response! Can you elaborate a bit more on that? Does this mean that before I train my model, I call the  inference_server.serve() with a dummy predict function and call it again when I finish training?",
    "3037820": "don't write predict function, don't call inference. save your model then do commit and save. then open kaggle homepage go to datasets on left panel. click new dataset and save your model as dataset. then in new notebook use this datset to load model and directly call inference."
  },
  "source": "meta"
}