{
  "id": 669465,
  "title": "infer time",
  "url": "/competitions/csiro-biomass/discussion/669465",
  "author_name": "",
  "post_date": "2026-01-22T13:18:25.286971900Z",
  "votes": 1,
  "comment_count": 4,
  "views": 0,
  "content": "<p>This is my first time participating in a CV competition. My inference code runs fine, but it takes four to five hours to submit and get a score. I want to know if this is normal, or if there is a master who can help me figure out what the problem is.🤯\n<a href=\"https://www.kaggle.com/code/goose666/0121base-2stream-ml?scriptVersionId=293121098\" target=\"_blank\">here is my infer notebook</a></p>",
  "messages": [
    {
      "id": "3395202",
      "postDate": "01/22/2026 13:18:25",
      "content": "<p>This is my first time participating in a CV competition. My inference code runs fine, but it takes four to five hours to submit and get a score. I want to know if this is normal, or if there is a master who can help me figure out what the problem is.🤯\n<a href=\"https://www.kaggle.com/code/goose666/0121base-2stream-ml?scriptVersionId=293121098\" target=\"_blank\">here is my infer notebook</a></p>",
      "rawMarkdown": "This is my first time participating in a CV competition. My inference code runs fine, but it takes four to five hours to submit and get a score. I want to know if this is normal, or if there is a master who can help me figure out what the problem is.🤯\n[here is my infer notebook](https://www.kaggle.com/code/goose666/0121base-2stream-ml?scriptVersionId=293121098)",
      "votes": null
    },
    {
      "id": "3395213",
      "postDate": "01/22/2026 13:32:34",
      "content": "<p>The link to your notebook is broken. Please fix it.</p>",
      "rawMarkdown": "The link to your notebook is broken. Please fix it.",
      "votes": null
    },
    {
      "id": "3395217",
      "postDate": "01/22/2026 13:38:35",
      "content": "<p>Sorry, but I don't understand why this code cannot be set to public. Here is my specific code.</p>",
      "rawMarkdown": "Sorry, but I don't understand why this code cannot be set to public. Here is my specific code.",
      "votes": null
    },
    {
      "id": "3395225",
      "postDate": "01/22/2026 13:55:49",
      "content": "<p>I would say the time is fair. Because you are using 5 folds, 4 TTAs, which means a total of 5x4=20 inferences. Alongside you also have some classical models attached I see. However, there might be an issue of CPU-bottleneck. Because your backbone is EfficientNet. Which is extremely faster, it is a 19.3 Million Parameter model unlike what most people are using here which are atleast 100 Million Parameter model. When the inference is too fast, and takes place on GPU, your model might keep waiting for data to arrive. This is a CPU-bottleneck. Which means your GPU is working faster than your CPU. I hence recommend you to use a <code>prefetch_factor=4</code> to your dataloader class. </p>\n<p>Another optimization is that, after processing every single batch, instead of simply moving to the next one, you are first moving the predictions back to the CPU. You can instead store all the predictions on GPU and only move all of them at last, just once. Because during this period, your model is again waiting. \nHope this helps.</p>",
      "rawMarkdown": "I would say the time is fair. Because you are using 5 folds, 4 TTAs, which means a total of 5x4=20 inferences. Alongside you also have some classical models attached I see. However, there might be an issue of CPU-bottleneck. Because your backbone is EfficientNet. Which is extremely faster, it is a 19.3 Million Parameter model unlike what most people are using here which are atleast 100 Million Parameter model. When the inference is too fast, and takes place on GPU, your model might keep waiting for data to arrive. This is a CPU-bottleneck. Which means your GPU is working faster than your CPU. I hence recommend you to use a `prefetch_factor=4` to your dataloader class. \n\nAnother optimization is that, after processing every single batch, instead of simply moving to the next one, you are first moving the predictions back to the CPU. You can instead store all the predictions on GPU and only move all of them at last, just once. Because during this period, your model is again waiting. \nHope this helps.",
      "votes": null
    },
    {
      "id": "3395234",
      "postDate": "01/22/2026 14:07:28",
      "content": "<p>Okay, thank you for your explanation. I will try to improve this part. Thank you very much, this has been a great help to me.😀</p>",
      "rawMarkdown": "Okay, thank you for your explanation. I will try to improve this part. Thank you very much, this has been a great help to me.😀",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 3395213,
      "author_name": "komilparmar",
      "author_url": "",
      "post_date": "01/22/2026 13:32:34",
      "content": "<p>The link to your notebook is broken. Please fix it.</p>",
      "votes": null,
      "replies": [
        {
          "id": 3395217,
          "author_name": "",
          "author_url": "",
          "post_date": "01/22/2026 13:38:35",
          "content": "<p>Sorry, but I don't understand why this code cannot be set to public. Here is my specific code.</p>",
          "votes": null,
          "replies": [
            {
              "id": 3395225,
              "author_name": "komilparmar",
              "author_url": "",
              "post_date": "01/22/2026 13:55:49",
              "content": "<p>I would say the time is fair. Because you are using 5 folds, 4 TTAs, which means a total of 5x4=20 inferences. Alongside you also have some classical models attached I see. However, there might be an issue of CPU-bottleneck. Because your backbone is EfficientNet. Which is extremely faster, it is a 19.3 Million Parameter model unlike what most people are using here which are atleast 100 Million Parameter model. When the inference is too fast, and takes place on GPU, your model might keep waiting for data to arrive. This is a CPU-bottleneck. Which means your GPU is working faster than your CPU. I hence recommend you to use a <code>prefetch_factor=4</code> to your dataloader class. </p>\n<p>Another optimization is that, after processing every single batch, instead of simply moving to the next one, you are first moving the predictions back to the CPU. You can instead store all the predictions on GPU and only move all of them at last, just once. Because during this period, your model is again waiting. \nHope this helps.</p>",
              "votes": null,
              "replies": [
                {
                  "id": 3395234,
                  "author_name": "",
                  "author_url": "",
                  "post_date": "01/22/2026 14:07:28",
                  "content": "<p>Okay, thank you for your explanation. I will try to improve this part. Thank you very much, this has been a great help to me.😀</p>",
                  "votes": null,
                  "replies": []
                }
              ]
            }
          ]
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "3395202": "This is my first time participating in a CV competition. My inference code runs fine, but it takes four to five hours to submit and get a score. I want to know if this is normal, or if there is a master who can help me figure out what the problem is.🤯\n[here is my infer notebook](https://www.kaggle.com/code/goose666/0121base-2stream-ml?scriptVersionId=293121098)",
    "3395213": "The link to your notebook is broken. Please fix it.",
    "3395217": "Sorry, but I don't understand why this code cannot be set to public. Here is my specific code.",
    "3395225": "I would say the time is fair. Because you are using 5 folds, 4 TTAs, which means a total of 5x4=20 inferences. Alongside you also have some classical models attached I see. However, there might be an issue of CPU-bottleneck. Because your backbone is EfficientNet. Which is extremely faster, it is a 19.3 Million Parameter model unlike what most people are using here which are atleast 100 Million Parameter model. When the inference is too fast, and takes place on GPU, your model might keep waiting for data to arrive. This is a CPU-bottleneck. Which means your GPU is working faster than your CPU. I hence recommend you to use a `prefetch_factor=4` to your dataloader class. \n\nAnother optimization is that, after processing every single batch, instead of simply moving to the next one, you are first moving the predictions back to the CPU. You can instead store all the predictions on GPU and only move all of them at last, just once. Because during this period, your model is again waiting. \nHope this helps.",
    "3395234": "Okay, thank you for your explanation. I will try to improve this part. Thank you very much, this has been a great help to me.😀"
  },
  "source": "meta"
}