{
  "id": 181751,
  "title": "Regarding agent sampling ",
  "url": "/competitions/lyft-motion-prediction-autonomous-vehicles/discussion/181751",
  "author_name": "",
  "post_date": "2020-09-10T03:53:44.069657300Z",
  "votes": 9,
  "comment_count": 2,
  "views": 0,
  "content": "<p>Team, when I am debugging l5kit, I found something but I am not sure it's functionally correct or not. Kindly clarify me </p>\n<p>At the time of <a href=\"https://github.com/lyft/l5kit/blob/master/l5kit/l5kit/sampling/agent_sampling.py#L73\" target=\"_blank\">agent sampling</a>, I can see that the l5kit team slicing history and future frames based on the number_of_frames (interested) and step_size (-ve  value for history and +ve value for future).<br>\nEx: </p>\n<pre><code>list_of_frame_index_of_scene = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\ninterested_current_state_index = 4\nstep_size = 2\nnumber_of_frames_interested_states = 2\n#then\nhistory_and_future_frames_of_current_state_index = [0, 2, 4, 6, 8]\n</code></pre>\n<p>At the time of <a href=\"https://github.com/lyft/l5kit/blob/master/l5kit/l5kit/data/filter.py#L136\" target=\"_blank\">getting agents</a> by using agent_intervals which are available in frames, l5kit team sequentially parsing by looking at the starting index available at the first frame and the ending index at the last frame in the given frame_array(s). </p>\n<ul>\n<li>But this may not true for frame_array which we made based on step_size right? because some frames(state) are missing between.</li>\n<li>or l5kit team assuming that agents available at the first frame and last frame in a given array can be the same?</li>\n</ul>\n<p>Thanks,<br>\nPallavi.</p>",
  "messages": [
    {
      "id": "1004814",
      "postDate": "09/10/2020 03:53:44",
      "content": "<p>Team, when I am debugging l5kit, I found something but I am not sure it's functionally correct or not. Kindly clarify me </p>\n<p>At the time of <a href=\"https://github.com/lyft/l5kit/blob/master/l5kit/l5kit/sampling/agent_sampling.py#L73\" target=\"_blank\">agent sampling</a>, I can see that the l5kit team slicing history and future frames based on the number_of_frames (interested) and step_size (-ve  value for history and +ve value for future).<br>\nEx: </p>\n<pre><code>list_of_frame_index_of_scene = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\ninterested_current_state_index = 4\nstep_size = 2\nnumber_of_frames_interested_states = 2\n#then\nhistory_and_future_frames_of_current_state_index = [0, 2, 4, 6, 8]\n</code></pre>\n<p>At the time of <a href=\"https://github.com/lyft/l5kit/blob/master/l5kit/l5kit/data/filter.py#L136\" target=\"_blank\">getting agents</a> by using agent_intervals which are available in frames, l5kit team sequentially parsing by looking at the starting index available at the first frame and the ending index at the last frame in the given frame_array(s). </p>\n<ul>\n<li>But this may not true for frame_array which we made based on step_size right? because some frames(state) are missing between.</li>\n<li>or l5kit team assuming that agents available at the first frame and last frame in a given array can be the same?</li>\n</ul>\n<p>Thanks,<br>\nPallavi.</p>",
      "rawMarkdown": "Team, when I am debugging l5kit, I found something but I am not sure it's functionally correct or not. Kindly clarify me \n\nAt the time of [agent sampling](https://github.com/lyft/l5kit/blob/master/l5kit/l5kit/sampling/agent_sampling.py#L73), I can see that the l5kit team slicing history and future frames based on the number_of_frames (interested) and step_size (-ve  value for history and +ve value for future).\nEx: \n```\nlist_of_frame_index_of_scene = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\ninterested_current_state_index = 4\nstep_size = 2\nnumber_of_frames_interested_states = 2\n#then\nhistory_and_future_frames_of_current_state_index = [0, 2, 4, 6, 8]\n```\nAt the time of [getting agents](https://github.com/lyft/l5kit/blob/master/l5kit/l5kit/data/filter.py#L136) by using agent_intervals which are available in frames, l5kit team sequentially parsing by looking at the starting index available at the first frame and the ending index at the last frame in the given frame_array(s). \n\n- But this may not true for frame_array which we made based on step_size right? because some frames(state) are missing between.\n- or l5kit team assuming that agents available at the first frame and last frame in a given array can be the same?\n\nThanks,\nPallavi.",
      "votes": null
    },
    {
      "id": "1005244",
      "postDate": "09/10/2020 10:56:49",
      "content": "<p>The answer is simpler (and a little bit embarrassing):<br>\n<code>step_size&gt;1</code> has not been properly tested (yet), so it's very likely you will find nasty bugs by setting it to higher values.</p>\n<p>It's not a feature we really use internally, and has been almost completely ignored in latest updates. If anyone finds any bugs, please report them to <a href=\"https://github.com/lyft/l5kit/issues\" target=\"_blank\">l5kit github </a> so I can start tracking them down</p>",
      "rawMarkdown": "The answer is simpler (and a little bit embarrassing):\n`step_size>1` has not been properly tested (yet), so it's very likely you will find nasty bugs by setting it to higher values.\n\nIt's not a feature we really use internally, and has been almost completely ignored in latest updates. If anyone finds any bugs, please report them to [l5kit github ](https://github.com/lyft/l5kit/issues) so I can start tracking them down",
      "votes": null
    },
    {
      "id": "1006632",
      "postDate": "09/11/2020 12:37:14",
      "content": "<p><a href=\"https://www.kaggle.com/lucabergamini\" target=\"_blank\">@lucabergamini</a>  Sure will raise issue to l5kit GitHub with the same content. Thank you!</p>",
      "rawMarkdown": "lucabergamini  Sure will raise issue to l5kit GitHub with the same content. Thank you!",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1005244,
      "author_name": "lucabergamini",
      "author_url": "",
      "post_date": "09/10/2020 10:56:49",
      "content": "<p>The answer is simpler (and a little bit embarrassing):<br>\n<code>step_size&gt;1</code> has not been properly tested (yet), so it's very likely you will find nasty bugs by setting it to higher values.</p>\n<p>It's not a feature we really use internally, and has been almost completely ignored in latest updates. If anyone finds any bugs, please report them to <a href=\"https://github.com/lyft/l5kit/issues\" target=\"_blank\">l5kit github </a> so I can start tracking them down</p>",
      "votes": null,
      "replies": [
        {
          "id": 1006632,
          "author_name": "pallaviroyal",
          "author_url": "",
          "post_date": "09/11/2020 12:37:14",
          "content": "<p><a href=\"https://www.kaggle.com/lucabergamini\" target=\"_blank\">@lucabergamini</a>  Sure will raise issue to l5kit GitHub with the same content. Thank you!</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "1004814": "Team, when I am debugging l5kit, I found something but I am not sure it's functionally correct or not. Kindly clarify me \n\nAt the time of [agent sampling](https://github.com/lyft/l5kit/blob/master/l5kit/l5kit/sampling/agent_sampling.py#L73), I can see that the l5kit team slicing history and future frames based on the number_of_frames (interested) and step_size (-ve  value for history and +ve value for future).\nEx: \n```\nlist_of_frame_index_of_scene = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\ninterested_current_state_index = 4\nstep_size = 2\nnumber_of_frames_interested_states = 2\n#then\nhistory_and_future_frames_of_current_state_index = [0, 2, 4, 6, 8]\n```\nAt the time of [getting agents](https://github.com/lyft/l5kit/blob/master/l5kit/l5kit/data/filter.py#L136) by using agent_intervals which are available in frames, l5kit team sequentially parsing by looking at the starting index available at the first frame and the ending index at the last frame in the given frame_array(s). \n\n- But this may not true for frame_array which we made based on step_size right? because some frames(state) are missing between.\n- or l5kit team assuming that agents available at the first frame and last frame in a given array can be the same?\n\nThanks,\nPallavi.",
    "1005244": "The answer is simpler (and a little bit embarrassing):\n`step_size>1` has not been properly tested (yet), so it's very likely you will find nasty bugs by setting it to higher values.\n\nIt's not a feature we really use internally, and has been almost completely ignored in latest updates. If anyone finds any bugs, please report them to [l5kit github ](https://github.com/lyft/l5kit/issues) so I can start tracking them down",
    "1006632": "lucabergamini  Sure will raise issue to l5kit GitHub with the same content. Thank you!"
  },
  "source": "meta"
}