{
  "id": 544921,
  "title": "Why does my notebook run successfully but an error occurs when grading?（Notebook Inference Server Error）",
  "url": "/competitions/jane-street-real-time-market-data-forecasting/discussion/544921",
  "author_name": "",
  "post_date": "2024-11-07T15:01:30.411475500Z",
  "votes": 1,
  "comment_count": 6,
  "views": 0,
  "content": "<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F20366111%2F71422d70425091f1f71f8079104d9b92%2F2024-11-07%20225412.png?generation=1730991351643992&amp;alt=media\" alt=\"\"><br>\nThe above is a screenshot of my notebook running after submission<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F20366111%2F084269992fc50f52f98b5aa7b0793757%2F2024-11-07%20225800.png?generation=1730991491644737&amp;alt=media\" alt=\"\"><br>\nThe above is the error I was prompted when submitting, but my notebook only ran for forty minutes and did not reach the timeout limit (1h）</p>",
  "messages": [
    {
      "id": "3039007",
      "postDate": "11/07/2024 15:01:30",
      "content": "<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F20366111%2F71422d70425091f1f71f8079104d9b92%2F2024-11-07%20225412.png?generation=1730991351643992&amp;alt=media\" alt=\"\"><br>\nThe above is a screenshot of my notebook running after submission<br>\n<img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F20366111%2F084269992fc50f52f98b5aa7b0793757%2F2024-11-07%20225800.png?generation=1730991491644737&amp;alt=media\" alt=\"\"><br>\nThe above is the error I was prompted when submitting, but my notebook only ran for forty minutes and did not reach the timeout limit (1h）</p>",
      "rawMarkdown": "![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F20366111%2F71422d70425091f1f71f8079104d9b92%2F2024-11-07%20225412.png?generation=1730991351643992&alt=media)\nThe above is a screenshot of my notebook running after submission\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F20366111%2F084269992fc50f52f98b5aa7b0793757%2F2024-11-07%20225800.png?generation=1730991491644737&alt=media)\nThe above is the error I was prompted when submitting, but my notebook only ran for forty minutes and did not reach the timeout limit (1h）",
      "votes": null
    },
    {
      "id": "3039039",
      "postDate": "11/07/2024 15:35:02",
      "content": "<p>I think it’s because the official mentioned“When your notebook is run on the hidden test set, inference_server.serve must be called within 15 minutes of the notebook starting or the gateway will throw an error. 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 1 minute response deadline.”<br>\nWhen I submit the code, I will first run the current version of the notebook. At this time, the inference server has entered a 15-minute countdown. When grading, when the inference server starts, the 15-minute countdown has exceeded, and This resulted in an error, can I understand it this way?</p>",
      "rawMarkdown": "I think it’s because the official mentioned“When your notebook is run on the hidden test set, inference_server.serve must be called within 15 minutes of the notebook starting or the gateway will throw an error. 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 1 minute response deadline.”\nWhen I submit the code, I will first run the current version of the notebook. At this time, the inference server has entered a 15-minute countdown. When grading, when the inference server starts, the 15-minute countdown has exceeded, and This resulted in an error, can I understand it this way?",
      "votes": null
    },
    {
      "id": "3039144",
      "postDate": "11/07/2024 17:54:59",
      "content": "<p>here are the time limits you should keep in mind :</p>\n<ul>\n<li>The run time of the notebook should not pass 8h.</li>\n<li>the API should be called before 15 mins. so it's better to make a separate notebook for training and another for inference.</li>\n<li>each call of the API must take less than 10s except the first call has no time limit so you load your models during the first call if the first 15 mins is not enough.</li>\n<li>even if the time limit for a single predict call is 10s you should try to keep the execution time of a single predict call on average around 150 ms else you will exceed the 8h time limit.</li>\n<li>try to measure the execution time for a single predict call from the API to get a sense on how long it takes to score a submission.</li>\n</ul>",
      "rawMarkdown": "here are the time limits you should keep in mind :\n\n- The run time of the notebook should not pass 8h.\n- the API should be called before 15 mins. so it's better to make a separate notebook for training and another for inference.\n- each call of the API must take less than 10s except the first call has no time limit so you load your models during the first call if the first 15 mins is not enough.\n- even if the time limit for a single predict call is 10s you should try to keep the execution time of a single predict call on average around 150 ms else you will exceed the 8h time limit.\n- try to measure the execution time for a single predict call from the API to get a sense on how long it takes to score a submission.",
      "votes": null
    },
    {
      "id": "3085767",
      "postDate": "01/01/2025 14:59:34",
      "content": "<p>Where did you find these requirements (specifically the 150ms)? I can only find that a call to <code>predict</code> is limited to one minute runtime and the overall runtime is limited to eight hours.</p>",
      "rawMarkdown": "Where did you find these requirements (specifically the 150ms)? I can only find that a call to `predict` is limited to one minute runtime and the overall runtime is limited to eight hours.",
      "votes": null
    },
    {
      "id": "3085801",
      "postDate": "01/01/2025 15:47:29",
      "content": "<p>total 8 hours divided by the estimated size of data (~200 days for public LB &amp; ~120 days for private LB, 968 batches per day).</p>",
      "rawMarkdown": "total 8 hours divided by the estimated size of data (~200 days for public LB & ~120 days for private LB, 968 batches per day).",
      "votes": null
    },
    {
      "id": "3087347",
      "postDate": "01/03/2025 11:48:29",
      "content": "<p>If your estimate is correct, I found out that you actually only have about ~110ms because the server takes some time to run as well.</p>",
      "rawMarkdown": "If your estimate is correct, I found out that you actually only have about ~110ms because the server takes some time to run as well.",
      "votes": null
    },
    {
      "id": "3087361",
      "postDate": "01/03/2025 12:03:31",
      "content": "<p>you can set is_scored flag to save some time.</p>",
      "rawMarkdown": "you can set is_scored flag to save some time.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 3039039,
      "author_name": "dearluna",
      "author_url": "",
      "post_date": "11/07/2024 15:35:02",
      "content": "<p>I think it’s because the official mentioned“When your notebook is run on the hidden test set, inference_server.serve must be called within 15 minutes of the notebook starting or the gateway will throw an error. 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 1 minute response deadline.”<br>\nWhen I submit the code, I will first run the current version of the notebook. At this time, the inference server has entered a 15-minute countdown. When grading, when the inference server starts, the 15-minute countdown has exceeded, and This resulted in an error, can I understand it this way?</p>",
      "votes": null,
      "replies": [
        {
          "id": 3039144,
          "author_name": "younesbenalia",
          "author_url": "",
          "post_date": "11/07/2024 17:54:59",
          "content": "<p>here are the time limits you should keep in mind :</p>\n<ul>\n<li>The run time of the notebook should not pass 8h.</li>\n<li>the API should be called before 15 mins. so it's better to make a separate notebook for training and another for inference.</li>\n<li>each call of the API must take less than 10s except the first call has no time limit so you load your models during the first call if the first 15 mins is not enough.</li>\n<li>even if the time limit for a single predict call is 10s you should try to keep the execution time of a single predict call on average around 150 ms else you will exceed the 8h time limit.</li>\n<li>try to measure the execution time for a single predict call from the API to get a sense on how long it takes to score a submission.</li>\n</ul>",
          "votes": null,
          "replies": [
            {
              "id": 3085767,
              "author_name": "thijsvanweezel",
              "author_url": "",
              "post_date": "01/01/2025 14:59:34",
              "content": "<p>Where did you find these requirements (specifically the 150ms)? I can only find that a call to <code>predict</code> is limited to one minute runtime and the overall runtime is limited to eight hours.</p>",
              "votes": null,
              "replies": [
                {
                  "id": 3085801,
                  "author_name": "shiyili",
                  "author_url": "",
                  "post_date": "01/01/2025 15:47:29",
                  "content": "<p>total 8 hours divided by the estimated size of data (~200 days for public LB &amp; ~120 days for private LB, 968 batches per day).</p>",
                  "votes": null,
                  "replies": [
                    {
                      "id": 3087347,
                      "author_name": "thijsvanweezel",
                      "author_url": "",
                      "post_date": "01/03/2025 11:48:29",
                      "content": "<p>If your estimate is correct, I found out that you actually only have about ~110ms because the server takes some time to run as well.</p>",
                      "votes": null,
                      "replies": [
                        {
                          "id": 3087361,
                          "author_name": "shiyili",
                          "author_url": "",
                          "post_date": "01/03/2025 12:03:31",
                          "content": "<p>you can set is_scored flag to save some time.</p>",
                          "votes": null,
                          "replies": []
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "3039007": "![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F20366111%2F71422d70425091f1f71f8079104d9b92%2F2024-11-07%20225412.png?generation=1730991351643992&alt=media)\nThe above is a screenshot of my notebook running after submission\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F20366111%2F084269992fc50f52f98b5aa7b0793757%2F2024-11-07%20225800.png?generation=1730991491644737&alt=media)\nThe above is the error I was prompted when submitting, but my notebook only ran for forty minutes and did not reach the timeout limit (1h）",
    "3039039": "I think it’s because the official mentioned“When your notebook is run on the hidden test set, inference_server.serve must be called within 15 minutes of the notebook starting or the gateway will throw an error. 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 1 minute response deadline.”\nWhen I submit the code, I will first run the current version of the notebook. At this time, the inference server has entered a 15-minute countdown. When grading, when the inference server starts, the 15-minute countdown has exceeded, and This resulted in an error, can I understand it this way?",
    "3039144": "here are the time limits you should keep in mind :\n\n- The run time of the notebook should not pass 8h.\n- the API should be called before 15 mins. so it's better to make a separate notebook for training and another for inference.\n- each call of the API must take less than 10s except the first call has no time limit so you load your models during the first call if the first 15 mins is not enough.\n- even if the time limit for a single predict call is 10s you should try to keep the execution time of a single predict call on average around 150 ms else you will exceed the 8h time limit.\n- try to measure the execution time for a single predict call from the API to get a sense on how long it takes to score a submission.",
    "3085767": "Where did you find these requirements (specifically the 150ms)? I can only find that a call to `predict` is limited to one minute runtime and the overall runtime is limited to eight hours.",
    "3085801": "total 8 hours divided by the estimated size of data (~200 days for public LB & ~120 days for private LB, 968 batches per day).",
    "3087347": "If your estimate is correct, I found out that you actually only have about ~110ms because the server takes some time to run as well.",
    "3087361": "you can set is_scored flag to save some time."
  },
  "source": "meta"
}