{
  "id": 228939,
  "title": "Slow TPU Inference Time",
  "url": "/competitions/plant-pathology-2021-fgvc8/discussion/228939",
  "author_name": "",
  "post_date": "2021-03-27T10:19:21.362793600Z",
  "votes": 2,
  "comment_count": 5,
  "views": 0,
  "content": "<p>I've been <a href=\"https://www.kaggle.com/nickuzmenkov\" target=\"_blank\">@nickuzmenkov</a>'s <a href=\"https://www.kaggle.com/nickuzmenkov/pp2021-tpu-tf-inference/\" target=\"_blank\">kernel</a> as a Template, with a heavier model architecture (Not made public yet). And have been facing some errors with the TPU time limit. <br>\nThe time limit is 120 minutes for a TPU kernel, and my Inference kernel takes 203 minutes (almost double). Any ideas from the community on how I can speed this up ?</p>",
  "messages": [
    {
      "id": "1254073",
      "postDate": "03/27/2021 10:19:21",
      "content": "<p>I've been <a href=\"https://www.kaggle.com/nickuzmenkov\" target=\"_blank\">@nickuzmenkov</a>'s <a href=\"https://www.kaggle.com/nickuzmenkov/pp2021-tpu-tf-inference/\" target=\"_blank\">kernel</a> as a Template, with a heavier model architecture (Not made public yet). And have been facing some errors with the TPU time limit. <br>\nThe time limit is 120 minutes for a TPU kernel, and my Inference kernel takes 203 minutes (almost double). Any ideas from the community on how I can speed this up ?</p>",
      "rawMarkdown": "I've been @nickuzmenkov's [kernel](https://www.kaggle.com/nickuzmenkov/pp2021-tpu-tf-inference/) as a Template, with a heavier model architecture (Not made public yet). And have been facing some errors with the TPU time limit. \n\n\nThe time limit is 120 minutes for a TPU kernel, and my Inference kernel takes 203 minutes (almost double). Any ideas from the community on how I can speed this up ?",
      "votes": null
    },
    {
      "id": "1254200",
      "postDate": "03/27/2021 12:29:45",
      "content": "<p>Hello! </p>\n<p>Do you mean GPU (TPUs are not allowed for inference)? What backbone you're using? (e.g. the last version of my inference notebook takes 14 minutes to run with 5 EfficientNetB4 ensemble).</p>",
      "rawMarkdown": "Hello! \n\nDo you mean GPU (TPUs are not allowed for inference)? What backbone you're using? (e.g. the last version of my inference notebook takes 14 minutes to run with 5 EfficientNetB4 ensemble).",
      "votes": null
    },
    {
      "id": "1254227",
      "postDate": "03/27/2021 12:53:28",
      "content": "<p>Hey, maybe I didn't read the rules carefully enough or something. But when I submitted a TPU Inference kernel, it said:</p>\n<pre><code>Your Notebook cannot use TPU in this competition.\nYour Notebook's runtime of 203 minutes exceeds this competition's TPU max of 120 minutes.\n</code></pre>\n<p>But, then when I submitted a much \"lighter\" Inference Kernel (by lighter I mean a kernel that took less time), It allowed me to submit (<strong>a TPU Kernel</strong>).</p>\n<p>Also, I'm using a <code>SEResnet101</code> Backbone</p>",
      "rawMarkdown": "Hey, maybe I didn't read the rules carefully enough or something. But when I submitted a TPU Inference kernel, it said:\n\n```\nYour Notebook cannot use TPU in this competition.\nYour Notebook's runtime of 203 minutes exceeds this competition's TPU max of 120 minutes.\n```\n\nBut, then when I submitted a much \"lighter\" Inference Kernel (by lighter I mean a kernel that took less time), It allowed me to submit (**a TPU Kernel**).\n\nAlso, I'm using a `SEResnet101` Backbone",
      "votes": null
    },
    {
      "id": "1254263",
      "postDate": "03/27/2021 13:32:32",
      "content": "<p>Do you use both my train and inference notebook as a template or just a train notebook and do inference in yours?</p>",
      "rawMarkdown": "Do you use both my train and inference notebook as a template or just a train notebook and do inference in yours?",
      "votes": null
    },
    {
      "id": "1254286",
      "postDate": "03/27/2021 13:46:30",
      "content": "<p>I created a separate Train Notebook using your kernel as a template and then forked your Inference Kernel again to create an Inference Notebook.</p>",
      "rawMarkdown": "I created a separate Train Notebook using your kernel as a template and then forked your Inference Kernel again to create an Inference Notebook.",
      "votes": null
    },
    {
      "id": "1254329",
      "postDate": "03/27/2021 14:39:07",
      "content": "<p>That's strange.</p>\n<p>If you don't mind sharing, maybe I can find what's the problem is by looking through your notebook.</p>",
      "rawMarkdown": "That's strange.\n\nIf you don't mind sharing, maybe I can find what's the problem is by looking through your notebook.",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1254200,
      "author_name": "nickuzmenkov",
      "author_url": "",
      "post_date": "03/27/2021 12:29:45",
      "content": "<p>Hello! </p>\n<p>Do you mean GPU (TPUs are not allowed for inference)? What backbone you're using? (e.g. the last version of my inference notebook takes 14 minutes to run with 5 EfficientNetB4 ensemble).</p>",
      "votes": null,
      "replies": [
        {
          "id": 1254227,
          "author_name": "sauravmaheshkar",
          "author_url": "",
          "post_date": "03/27/2021 12:53:28",
          "content": "<p>Hey, maybe I didn't read the rules carefully enough or something. But when I submitted a TPU Inference kernel, it said:</p>\n<pre><code>Your Notebook cannot use TPU in this competition.\nYour Notebook's runtime of 203 minutes exceeds this competition's TPU max of 120 minutes.\n</code></pre>\n<p>But, then when I submitted a much \"lighter\" Inference Kernel (by lighter I mean a kernel that took less time), It allowed me to submit (<strong>a TPU Kernel</strong>).</p>\n<p>Also, I'm using a <code>SEResnet101</code> Backbone</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1254263,
          "author_name": "nickuzmenkov",
          "author_url": "",
          "post_date": "03/27/2021 13:32:32",
          "content": "<p>Do you use both my train and inference notebook as a template or just a train notebook and do inference in yours?</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1254286,
          "author_name": "sauravmaheshkar",
          "author_url": "",
          "post_date": "03/27/2021 13:46:30",
          "content": "<p>I created a separate Train Notebook using your kernel as a template and then forked your Inference Kernel again to create an Inference Notebook.</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 1254329,
          "author_name": "nickuzmenkov",
          "author_url": "",
          "post_date": "03/27/2021 14:39:07",
          "content": "<p>That's strange.</p>\n<p>If you don't mind sharing, maybe I can find what's the problem is by looking through your notebook.</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1254073": "I've been @nickuzmenkov's [kernel](https://www.kaggle.com/nickuzmenkov/pp2021-tpu-tf-inference/) as a Template, with a heavier model architecture (Not made public yet). And have been facing some errors with the TPU time limit. \n\n\nThe time limit is 120 minutes for a TPU kernel, and my Inference kernel takes 203 minutes (almost double). Any ideas from the community on how I can speed this up ?",
    "1254200": "Hello! \n\nDo you mean GPU (TPUs are not allowed for inference)? What backbone you're using? (e.g. the last version of my inference notebook takes 14 minutes to run with 5 EfficientNetB4 ensemble).",
    "1254227": "Hey, maybe I didn't read the rules carefully enough or something. But when I submitted a TPU Inference kernel, it said:\n\n```\nYour Notebook cannot use TPU in this competition.\nYour Notebook's runtime of 203 minutes exceeds this competition's TPU max of 120 minutes.\n```\n\nBut, then when I submitted a much \"lighter\" Inference Kernel (by lighter I mean a kernel that took less time), It allowed me to submit (**a TPU Kernel**).\n\nAlso, I'm using a `SEResnet101` Backbone",
    "1254263": "Do you use both my train and inference notebook as a template or just a train notebook and do inference in yours?",
    "1254286": "I created a separate Train Notebook using your kernel as a template and then forked your Inference Kernel again to create an Inference Notebook.",
    "1254329": "That's strange.\n\nIf you don't mind sharing, maybe I can find what's the problem is by looking through your notebook."
  },
  "source": "meta"
}