{
  "id": 298761,
  "title": "Notebook timeouts",
  "url": "/competitions/g-research-crypto-forecasting/discussion/298761",
  "author_name": "",
  "post_date": "2022-01-04T13:19:52.049953400Z",
  "votes": 3,
  "comment_count": 4,
  "views": 0,
  "content": "<p>I know this has been discussed before, but, I feel there seems to be no satisfactory answer so far. This is why I try it again. I wrote two rather simple notebook examples. See the links here:</p>\n<p><a href=\"https://www.kaggle.com/rkellner/external-rnns\" target=\"_blank\">https://www.kaggle.com/rkellner/external-rnns</a><br>\n<a href=\"https://www.kaggle.com/rkellner/easy-booster\" target=\"_blank\">https://www.kaggle.com/rkellner/easy-booster</a></p>\n<p>The first loads external models, the second estimates models on the fly. Both make use of past data for making predictions which is very common. Both run about two minutes, so they they should not exceed the runtime limit.</p>\n<p>Can someone guide me the direction how to better handle this and make those notebooks submittable?</p>",
  "messages": [
    {
      "id": "1638118",
      "postDate": "01/04/2022 13:19:52",
      "content": "<p>I know this has been discussed before, but, I feel there seems to be no satisfactory answer so far. This is why I try it again. I wrote two rather simple notebook examples. See the links here:</p>\n<p><a href=\"https://www.kaggle.com/rkellner/external-rnns\" target=\"_blank\">https://www.kaggle.com/rkellner/external-rnns</a><br>\n<a href=\"https://www.kaggle.com/rkellner/easy-booster\" target=\"_blank\">https://www.kaggle.com/rkellner/easy-booster</a></p>\n<p>The first loads external models, the second estimates models on the fly. Both make use of past data for making predictions which is very common. Both run about two minutes, so they they should not exceed the runtime limit.</p>\n<p>Can someone guide me the direction how to better handle this and make those notebooks submittable?</p>",
      "rawMarkdown": "I know this has been discussed before, but, I feel there seems to be no satisfactory answer so far. This is why I try it again. I wrote two rather simple notebook examples. See the links here:\n\nhttps://www.kaggle.com/rkellner/external-rnns\nhttps://www.kaggle.com/rkellner/easy-booster\n\nThe first loads external models, the second estimates models on the fly. Both make use of past data for making predictions which is very common. Both run about two minutes, so they they should not exceed the runtime limit.\n\nCan someone guide me the direction how to better handle this and make those notebooks submittable?",
      "votes": null
    },
    {
      "id": "1638168",
      "postDate": "01/04/2022 14:04:47",
      "content": "<p>I cant see anything incorrect; however I would check your test submission when committing using:</p>\n<p>from datetime import datetime <br>\nstart_time = datetime.now() </p>\n<p>Submission Process</p>\n<p>time_elapsed = datetime.now() - start_time </p>\n<p>print('Time elapsed (hh:mm:ss.ms) {}'.format(time_elapsed))</p>\n<p>and make sure that the four test iterations are less than about 0.8 of a second otherwise you are going to time out.</p>",
      "rawMarkdown": "I cant see anything incorrect; however I would check your test submission when committing using:\n\nfrom datetime import datetime \nstart_time = datetime.now() \n\nSubmission Process\n\ntime_elapsed = datetime.now() - start_time \n\nprint('Time elapsed (hh:mm:ss.ms) {}'.format(time_elapsed))\n\nand make sure that the four test iterations are less than about 0.8 of a second otherwise you are going to time out.",
      "votes": null
    },
    {
      "id": "1638188",
      "postDate": "01/04/2022 14:16:35",
      "content": "<p>Dear <a href=\"https://www.kaggle.com/jonnydossantos\" target=\"_blank\">@jonnydossantos</a>, many thanks for the quick reply!</p>\n<p>So the four iterations need about 6 seconds so this seems to be the reason for timeout.</p>\n<p>May I ask where the information regarding the 0.8 seconds comes from? Did I miss this or overread it somewhere?</p>",
      "rawMarkdown": "Dear @jonnydossantos, many thanks for the quick reply!\n\nSo the four iterations need about 6 seconds so this seems to be the reason for timeout.\n\nMay I ask where the information regarding the 0.8 seconds comes from? Did I miss this or overread it somewhere?",
      "votes": null
    },
    {
      "id": "1638227",
      "postDate": "01/04/2022 14:46:45",
      "content": "<p>The total test is roughly three months of data, roughly 129600 iterations on the API so you need to be below 0.25s per iteration.  I was also timing out initially even at 0.98s I manage to get this down to about 0.3s for the four and it now takes roughly 3 hours to complete.  There are a couple of threads but we are all guessing at the moment.</p>",
      "rawMarkdown": "The total test is roughly three months of data, roughly 129600 iterations on the API so you need to be below 0.25s per iteration.  I was also timing out initially even at 0.98s I manage to get this down to about 0.3s for the four and it now takes roughly 3 hours to complete.  There are a couple of threads but we are all guessing at the moment.",
      "votes": null
    },
    {
      "id": "1638531",
      "postDate": "01/04/2022 19:58:16",
      "content": "<p>My <a href=\"https://www.kaggle.com/jagofc/local-api-emulator\" target=\"_blank\">Local API Emulator</a> might help you here with timing etc.</p>",
      "rawMarkdown": "My [Local API Emulator](https://www.kaggle.com/jagofc/local-api-emulator) might help you here with timing etc.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1638168,
      "author_name": "jonnydossantos",
      "author_url": "",
      "post_date": "01/04/2022 14:04:47",
      "content": "<p>I cant see anything incorrect; however I would check your test submission when committing using:</p>\n<p>from datetime import datetime <br>\nstart_time = datetime.now() </p>\n<p>Submission Process</p>\n<p>time_elapsed = datetime.now() - start_time </p>\n<p>print('Time elapsed (hh:mm:ss.ms) {}'.format(time_elapsed))</p>\n<p>and make sure that the four test iterations are less than about 0.8 of a second otherwise you are going to time out.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 1638188,
      "author_name": "rkellner",
      "author_url": "",
      "post_date": "01/04/2022 14:16:35",
      "content": "<p>Dear <a href=\"https://www.kaggle.com/jonnydossantos\" target=\"_blank\">@jonnydossantos</a>, many thanks for the quick reply!</p>\n<p>So the four iterations need about 6 seconds so this seems to be the reason for timeout.</p>\n<p>May I ask where the information regarding the 0.8 seconds comes from? Did I miss this or overread it somewhere?</p>",
      "votes": null,
      "replies": [
        {
          "id": 1638227,
          "author_name": "jonnydossantos",
          "author_url": "",
          "post_date": "01/04/2022 14:46:45",
          "content": "<p>The total test is roughly three months of data, roughly 129600 iterations on the API so you need to be below 0.25s per iteration.  I was also timing out initially even at 0.98s I manage to get this down to about 0.3s for the four and it now takes roughly 3 hours to complete.  There are a couple of threads but we are all guessing at the moment.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 1638531,
      "author_name": "jagofc",
      "author_url": "",
      "post_date": "01/04/2022 19:58:16",
      "content": "<p>My <a href=\"https://www.kaggle.com/jagofc/local-api-emulator\" target=\"_blank\">Local API Emulator</a> might help you here with timing etc.</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1638118": "I know this has been discussed before, but, I feel there seems to be no satisfactory answer so far. This is why I try it again. I wrote two rather simple notebook examples. See the links here:\n\nhttps://www.kaggle.com/rkellner/external-rnns\nhttps://www.kaggle.com/rkellner/easy-booster\n\nThe first loads external models, the second estimates models on the fly. Both make use of past data for making predictions which is very common. Both run about two minutes, so they they should not exceed the runtime limit.\n\nCan someone guide me the direction how to better handle this and make those notebooks submittable?",
    "1638168": "I cant see anything incorrect; however I would check your test submission when committing using:\n\nfrom datetime import datetime \nstart_time = datetime.now() \n\nSubmission Process\n\ntime_elapsed = datetime.now() - start_time \n\nprint('Time elapsed (hh:mm:ss.ms) {}'.format(time_elapsed))\n\nand make sure that the four test iterations are less than about 0.8 of a second otherwise you are going to time out.",
    "1638188": "Dear @jonnydossantos, many thanks for the quick reply!\n\nSo the four iterations need about 6 seconds so this seems to be the reason for timeout.\n\nMay I ask where the information regarding the 0.8 seconds comes from? Did I miss this or overread it somewhere?",
    "1638227": "The total test is roughly three months of data, roughly 129600 iterations on the API so you need to be below 0.25s per iteration.  I was also timing out initially even at 0.98s I manage to get this down to about 0.3s for the four and it now takes roughly 3 hours to complete.  There are a couple of threads but we are all guessing at the moment.",
    "1638531": "My [Local API Emulator](https://www.kaggle.com/jagofc/local-api-emulator) might help you here with timing etc."
  },
  "source": "meta"
}