{
  "id": 393284,
  "title": "Scoring time and dealing with variable length input",
  "url": "/competitions/asl-signs/discussion/393284",
  "author_name": "nyakasko",
  "post_date": "2023-03-08T18:07:10.582000",
  "votes": 0,
  "comment_count": 6,
  "views": 0,
  "content": "<p>Hey guy. On average, how long does the scoring last for you? </p>\n<p>Also, those who are struggling with LLMs, how do you deal with the variable length input? Are you shrinking it to a specific size? I am asking with respect to inference time…</p>",
  "messages": [
    {
      "id": 2174021,
      "postDate": "2023-03-08T19:38:14.793Z",
      "content": "<p>So far all solutions of any type that I've seen convert to a fixed length size.</p>\n<p>The fixed size varies a lot by solution. Size 1 (mean) or size 1+1 (mean + std) was very common. <a href=\"https://www.kaggle.com/code/roberthatch/gislr-feature-data-on-the-shoulders\" target=\"_blank\">My notebook</a> combined size 1+1 (mean + std), size 3+3 (mean + std), and size 15 (image.resize).</p>\n<p>The latest I saw was a <a href=\"https://www.kaggle.com/code/hengck23/lb-0-62-pytorch-transformer-solution\" target=\"_blank\">transformer model</a> using size 80 (and had tried other numbers like 96). If I'm reading it right, his approach is to pad with zeros if orig length is shorter, and keep only first 80 frames if longer. I wonder if tf.image.resize_with_crop_or_pad would be better? It would do the same, but from the middle instead of from the start. Example: [1,2] -&gt; [1,2,0,0] vs [0,1,2,0]. [1,2,3,4,5,6] -&gt; [1,2,3,4] vs [2,3,4,5]</p>",
      "rawMarkdown": "So far all solutions of any type that I've seen convert to a fixed length size.\n\nThe fixed size varies a lot by solution. Size 1 (mean) or size 1+1 (mean + std) was very common. [My notebook](https://www.kaggle.com/code/roberthatch/gislr-feature-data-on-the-shoulders) combined size 1+1 (mean + std), size 3+3 (mean + std), and size 15 (image.resize).\n\nThe latest I saw was a [transformer model](https://www.kaggle.com/code/hengck23/lb-0-62-pytorch-transformer-solution) using size 80 (and had tried other numbers like 96). If I'm reading it right, his approach is to pad with zeros if orig length is shorter, and keep only first 80 frames if longer. I wonder if tf.image.resize_with_crop_or_pad would be better? It would do the same, but from the middle instead of from the start. Example: [1,2] -> [1,2,0,0] vs [0,1,2,0]. [1,2,3,4,5,6] -> [1,2,3,4] vs [2,3,4,5]",
      "votes": 1,
      "replies": [
        {
          "id": 2174025,
          "postDate": "2023-03-08T19:39:17.670Z",
          "content": "<p>Oh, and my models seem to be taking about ~18 minutes to run the 'scoring', give or take a couple minutes.</p>",
          "rawMarkdown": "Oh, and my models seem to be taking about ~18 minutes to run the 'scoring', give or take a couple minutes.",
          "replies": [
            {
              "id": 2174033,
              "postDate": "2023-03-08T19:47:26.273Z",
              "content": "<blockquote>\n  <p>Oh, and my models seem to be taking about ~18 minutes to run the 'scoring', give or take a couple minutes.</p>\n</blockquote>\n<p>Thanks for the response! All of a sudden mine is taking well over 1 hour and fails with Submission Score Error. As far as I see, I have not changed anything that would cause this, the .tflite model runs in my notebook with around 0.02 sec per video… And the weird thing is that I was able to submit a solution before with the same method, and scored 0.47.</p>",
              "rawMarkdown": "> Oh, and my models seem to be taking about ~18 minutes to run the 'scoring', give or take a couple minutes.\n\n\nThanks for the response! All of a sudden mine is taking well over 1 hour and fails with Submission Score Error. As far as I see, I have not changed anything that would cause this, the .tflite model runs in my notebook with around 0.02 sec per video… And the weird thing is that I was able to submit a solution before with the same method, and scored 0.47."
            }
          ]
        },
        {
          "id": 2174080,
          "postDate": "2023-03-08T20:23:42.397Z",
          "content": "<p>\"his approach is to pad with zeros if orig length is shorter, and keep only first 80 frames if longer\"</p>\n<p>i use truncate for now (to meet memory and speed requirement).<br>\nmy solution deals with variable size, so no need to pad</p>",
          "rawMarkdown": "\"his approach is to pad with zeros if orig length is shorter, and keep only first 80 frames if longer\"\n\ni use truncate for now (to meet memory and speed requirement).\nmy solution deals with variable size, so no need to pad",
          "replies": [
            {
              "id": 2174723,
              "postDate": "2023-03-09T10:26:46.950Z",
              "rawMarkdown": "",
              "isDeleted": true
            }
          ]
        }
      ]
    },
    {
      "id": 2174685,
      "postDate": "2023-03-09T09:53:14.183Z",
      "content": "<p>I think they changed the evaluation script or something. I resubmitted a previously accepted solution and got Submission Scoring Error..</p>",
      "rawMarkdown": "I think they changed the evaluation script or something. I resubmitted a previously accepted solution and got Submission Scoring Error.."
    },
    {
      "id": 2173939,
      "postDate": "2023-03-08T18:07:10.583Z",
      "content": "<p>Hey guy. On average, how long does the scoring last for you? </p>\n<p>Also, those who are struggling with LLMs, how do you deal with the variable length input? Are you shrinking it to a specific size? I am asking with respect to inference time…</p>",
      "rawMarkdown": "Hey guy. On average, how long does the scoring last for you? \n\nAlso, those who are struggling with LLMs, how do you deal with the variable length input? Are you shrinking it to a specific size? I am asking with respect to inference time..."
    }
  ],
  "comments": [
    {
      "id": 2174021,
      "author_name": "Robert Hatch",
      "author_url": "",
      "post_date": "2023-03-08T19:38:14.793000",
      "content": "<p>So far all solutions of any type that I've seen convert to a fixed length size.</p>\n<p>The fixed size varies a lot by solution. Size 1 (mean) or size 1+1 (mean + std) was very common. <a href=\"https://www.kaggle.com/code/roberthatch/gislr-feature-data-on-the-shoulders\" target=\"_blank\">My notebook</a> combined size 1+1 (mean + std), size 3+3 (mean + std), and size 15 (image.resize).</p>\n<p>The latest I saw was a <a href=\"https://www.kaggle.com/code/hengck23/lb-0-62-pytorch-transformer-solution\" target=\"_blank\">transformer model</a> using size 80 (and had tried other numbers like 96). If I'm reading it right, his approach is to pad with zeros if orig length is shorter, and keep only first 80 frames if longer. I wonder if tf.image.resize_with_crop_or_pad would be better? It would do the same, but from the middle instead of from the start. Example: [1,2] -&gt; [1,2,0,0] vs [0,1,2,0]. [1,2,3,4,5,6] -&gt; [1,2,3,4] vs [2,3,4,5]</p>",
      "votes": 1,
      "replies": [
        {
          "id": 2174025,
          "author_name": "Robert Hatch",
          "author_url": "",
          "post_date": "2023-03-08T19:39:17.670000",
          "content": "<p>Oh, and my models seem to be taking about ~18 minutes to run the 'scoring', give or take a couple minutes.</p>",
          "votes": 0,
          "replies": [
            {
              "id": 2174033,
              "author_name": "nyakasko",
              "author_url": "",
              "post_date": "2023-03-08T19:47:26.273000",
              "content": "<blockquote>\n  <p>Oh, and my models seem to be taking about ~18 minutes to run the 'scoring', give or take a couple minutes.</p>\n</blockquote>\n<p>Thanks for the response! All of a sudden mine is taking well over 1 hour and fails with Submission Score Error. As far as I see, I have not changed anything that would cause this, the .tflite model runs in my notebook with around 0.02 sec per video… And the weird thing is that I was able to submit a solution before with the same method, and scored 0.47.</p>",
              "votes": 0,
              "replies": []
            }
          ]
        },
        {
          "id": 2174080,
          "author_name": "hengck23",
          "author_url": "",
          "post_date": "2023-03-08T20:23:42.397000",
          "content": "<p>\"his approach is to pad with zeros if orig length is shorter, and keep only first 80 frames if longer\"</p>\n<p>i use truncate for now (to meet memory and speed requirement).<br>\nmy solution deals with variable size, so no need to pad</p>",
          "votes": 0,
          "replies": [
            {
              "id": 2174723,
              "author_name": "",
              "author_url": "",
              "post_date": "2023-03-09T10:26:46.950000",
              "content": "",
              "votes": 0,
              "replies": []
            }
          ]
        }
      ]
    },
    {
      "id": 2174685,
      "author_name": "nyakasko",
      "author_url": "",
      "post_date": "2023-03-09T09:53:14.183000",
      "content": "<p>I think they changed the evaluation script or something. I resubmitted a previously accepted solution and got Submission Scoring Error..</p>",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "2174021": "So far all solutions of any type that I've seen convert to a fixed length size.\n\nThe fixed size varies a lot by solution. Size 1 (mean) or size 1+1 (mean + std) was very common. [My notebook](https://www.kaggle.com/code/roberthatch/gislr-feature-data-on-the-shoulders) combined size 1+1 (mean + std), size 3+3 (mean + std), and size 15 (image.resize).\n\nThe latest I saw was a [transformer model](https://www.kaggle.com/code/hengck23/lb-0-62-pytorch-transformer-solution) using size 80 (and had tried other numbers like 96). If I'm reading it right, his approach is to pad with zeros if orig length is shorter, and keep only first 80 frames if longer. I wonder if tf.image.resize_with_crop_or_pad would be better? It would do the same, but from the middle instead of from the start. Example: [1,2] -> [1,2,0,0] vs [0,1,2,0]. [1,2,3,4,5,6] -> [1,2,3,4] vs [2,3,4,5]",
    "2174685": "I think they changed the evaluation script or something. I resubmitted a previously accepted solution and got Submission Scoring Error..",
    "2173939": "Hey guy. On average, how long does the scoring last for you? \n\nAlso, those who are struggling with LLMs, how do you deal with the variable length input? Are you shrinking it to a specific size? I am asking with respect to inference time..."
  }
}