{
  "id": 187825,
  "title": "L5Kit 1.1.0 Released",
  "url": "/competitions/lyft-motion-prediction-autonomous-vehicles/discussion/187825",
  "author_name": "Luca Bergamini",
  "post_date": "2020-09-30T12:29:20.123000",
  "votes": 30,
  "comment_count": 29,
  "views": 0,
  "content": "<p>Hey  everyone,</p>\n<p>Yesterday we shipped a new L5Kit release (1.1.0) both on pypi and Kaggle.<br>\nYou can check which version you're using in your kernels by running:</p>\n<pre><code>import l5kit\nprint(l5kit.__version__)\n</code></pre>\n<p>If you're running 1.1.0 please take a look at:</p>\n<ul>\n<li><a href=\"https://github.com/lyft/l5kit/releases/tag/v1.1.0\" target=\"_blank\">the release notes</a>;</li>\n<li><a href=\"https://github.com/lyft/l5kit/blob/master/coords_systems.md\" target=\"_blank\">the coords_systems doc</a>;</li>\n<li><a href=\"https://github.com/lyft/l5kit/blob/master/data_format.md\" target=\"_blank\">the data_format doc</a>;</li>\n</ul>\n<p>The biggest breaking change is that <strong>target_positions are now in a new agent space and not in world space anymore</strong>. This is to address a misalignment between inputs and predictions (see <a href=\"https://www.kaggle.com/c/lyft-motion-prediction-autonomous-vehicles/discussion/186492\" target=\"_blank\">this post</a> and kudos to <a href=\"https://www.kaggle.com/zaharch\" target=\"_blank\">@zaharch</a> to have raised the issue) As we're not going to change the GT on Kaggle (i.e. it will stay in world displacements) you will need to convert your predictions back to that space (if you're predicting in this new space) before submitting. You can find examples on how to do that:</p>\n<ul>\n<li>in L5Kit <a href=\"https://github.com/lyft/l5kit/blob/master/examples/agent_motion_prediction/agent_motion_prediction.ipynb\" target=\"_blank\">prediction notebook</a>;</li>\n<li>in my <a href=\"https://www.kaggle.com/lucabergamini/lyft-baseline-09-02?scriptVersionId=43751473\" target=\"_blank\">Kaggle Kernel</a>. Please be sure to be on <strong>version 7</strong> (It's currently running, hopefully it will finish soon).</li>\n</ul>\n<p>If you have questions related to these changes please reply to this post and I'll do my best to address them :) As always, please report to the <a href=\"https://github.com/lyft/l5kit\" target=\"_blank\">GitHub page of L5kit</a> if you find any bugs.</p>",
  "messages": [
    {
      "id": 1032749,
      "postDate": "2020-09-30T12:29:20.123Z",
      "content": "<p>Hey  everyone,</p>\n<p>Yesterday we shipped a new L5Kit release (1.1.0) both on pypi and Kaggle.<br>\nYou can check which version you're using in your kernels by running:</p>\n<pre><code>import l5kit\nprint(l5kit.__version__)\n</code></pre>\n<p>If you're running 1.1.0 please take a look at:</p>\n<ul>\n<li><a href=\"https://github.com/lyft/l5kit/releases/tag/v1.1.0\" target=\"_blank\">the release notes</a>;</li>\n<li><a href=\"https://github.com/lyft/l5kit/blob/master/coords_systems.md\" target=\"_blank\">the coords_systems doc</a>;</li>\n<li><a href=\"https://github.com/lyft/l5kit/blob/master/data_format.md\" target=\"_blank\">the data_format doc</a>;</li>\n</ul>\n<p>The biggest breaking change is that <strong>target_positions are now in a new agent space and not in world space anymore</strong>. This is to address a misalignment between inputs and predictions (see <a href=\"https://www.kaggle.com/c/lyft-motion-prediction-autonomous-vehicles/discussion/186492\" target=\"_blank\">this post</a> and kudos to <a href=\"https://www.kaggle.com/zaharch\" target=\"_blank\">@zaharch</a> to have raised the issue) As we're not going to change the GT on Kaggle (i.e. it will stay in world displacements) you will need to convert your predictions back to that space (if you're predicting in this new space) before submitting. You can find examples on how to do that:</p>\n<ul>\n<li>in L5Kit <a href=\"https://github.com/lyft/l5kit/blob/master/examples/agent_motion_prediction/agent_motion_prediction.ipynb\" target=\"_blank\">prediction notebook</a>;</li>\n<li>in my <a href=\"https://www.kaggle.com/lucabergamini/lyft-baseline-09-02?scriptVersionId=43751473\" target=\"_blank\">Kaggle Kernel</a>. Please be sure to be on <strong>version 7</strong> (It's currently running, hopefully it will finish soon).</li>\n</ul>\n<p>If you have questions related to these changes please reply to this post and I'll do my best to address them :) As always, please report to the <a href=\"https://github.com/lyft/l5kit\" target=\"_blank\">GitHub page of L5kit</a> if you find any bugs.</p>",
      "rawMarkdown": "Hey  everyone,\n\nYesterday we shipped a new L5Kit release (1.1.0) both on pypi and Kaggle.\nYou can check which version you're using in your kernels by running:\n```python\nimport l5kit\nprint(l5kit.__version__)\n``` \n\nIf you're running 1.1.0 please take a look at:\n- [the release notes](https://github.com/lyft/l5kit/releases/tag/v1.1.0);\n- [the coords_systems doc](https://github.com/lyft/l5kit/blob/master/coords_systems.md);\n- [the data_format doc](https://github.com/lyft/l5kit/blob/master/data_format.md);\n\nThe biggest breaking change is that **target_positions are now in a new agent space and not in world space anymore**. This is to address a misalignment between inputs and predictions (see [this post](https://www.kaggle.com/c/lyft-motion-prediction-autonomous-vehicles/discussion/186492) and kudos to @zaharch to have raised the issue) As we're not going to change the GT on Kaggle (i.e. it will stay in world displacements) you will need to convert your predictions back to that space (if you're predicting in this new space) before submitting. You can find examples on how to do that:\n- in L5Kit [prediction notebook](https://github.com/lyft/l5kit/blob/master/examples/agent_motion_prediction/agent_motion_prediction.ipynb);\n- in my [Kaggle Kernel](https://www.kaggle.com/lucabergamini/lyft-baseline-09-02?scriptVersionId=43751473). Please be sure to be on **version 7** (It's currently running, hopefully it will finish soon).\n\nIf you have questions related to these changes please reply to this post and I'll do my best to address them :) As always, please report to the [GitHub page of L5kit](https://github.com/lyft/l5kit) if you find any bugs.",
      "votes": 30
    },
    {
      "id": 1032773,
      "postDate": "2020-09-30T12:44:33.173Z",
      "content": "<p>Thanks for the quick update!</p>\n<p>I might have found an unintended change in the function <code>draw_trajectory()</code>:</p>\n<p>The old code:<br>\n<code>draw_trajectory(im, target_positions_pixels, sample[\"target_yaws\"], TARGET_POINTS_COLOR)</code></p>\n<p>throws the following error:</p>\n<pre><code>/kaggle/usr/lib/kaggle_l5kit/l5kit/visualization/utils.py in draw_trajectory(on_image, positions, rgb_color, radius, yaws)\n     70         for pos in positions:\n     71             pred_waypoint = pos[:2]\n---&gt; 72             cv2.circle(on_image, tuple(pred_waypoint.astype(np.int)), radius, rgb_color, -1)\nTypeError: Argument 'radius' is required to be an integer\n</code></pre>\n<p>As can be seen from the github, the yaws are now the 5th argument and no longer the 3rd argument for the drawing function. Was this an intended change?</p>\n<p>The new call must now be:<br>\n<code>draw_trajectory(im, target_positions_pixels, TARGET_POINTS_COLOR, radius=1, yaws=sample[\"target_yaws\"])</code></p>",
      "rawMarkdown": "Thanks for the quick update!\n\nI might have found an unintended change in the function `draw_trajectory()`:\n\nThe old code:\n`draw_trajectory(im, target_positions_pixels, sample[\"target_yaws\"], TARGET_POINTS_COLOR)`\n\nthrows the following error:\n```\n/kaggle/usr/lib/kaggle_l5kit/l5kit/visualization/utils.py in draw_trajectory(on_image, positions, rgb_color, radius, yaws)\n     70         for pos in positions:\n     71             pred_waypoint = pos[:2]\n---> 72             cv2.circle(on_image, tuple(pred_waypoint.astype(np.int)), radius, rgb_color, -1)\nTypeError: Argument 'radius' is required to be an integer\n```\n\nAs can be seen from the github, the yaws are now the 5th argument and no longer the 3rd argument for the drawing function. Was this an intended change?\n\nThe new call must now be:\n`draw_trajectory(im, target_positions_pixels, TARGET_POINTS_COLOR, radius=1, yaws=sample[\"target_yaws\"])`",
      "votes": 3,
      "replies": [
        {
          "id": 1032909,
          "postDate": "2020-09-30T14:03:31.103Z",
          "content": "<p>That's intended, we also made the yaws optional as we don't predict them for this competition :) </p>",
          "rawMarkdown": "That's intended, we also made the yaws optional as we don't predict them for this competition :) ",
          "votes": 2
        },
        {
          "id": 1032928,
          "postDate": "2020-09-30T14:16:59.837Z",
          "content": "<p>Ok, thanks for clarification. <br>\nI wasn't sure about it, as you released a MINOR update (hinting semver here) and the change in order wasn't really necessary for the function to work.</p>",
          "rawMarkdown": "Ok, thanks for clarification. \nI wasn't sure about it, as you released a MINOR update (hinting semver here) and the change in order wasn't really necessary for the function to work.",
          "votes": 1
        }
      ]
    },
    {
      "id": 1037303,
      "postDate": "2020-10-04T20:11:19.240Z",
      "content": "<p>Hi guys, thanks for the update. Can you just confirm: are the ground truth files generated by create_chopped_dataset() in agent space or world space? I suspect it's still the latter? Thanks.</p>",
      "rawMarkdown": "Hi guys, thanks for the update. Can you just confirm: are the ground truth files generated by create_chopped_dataset() in agent space or world space? I suspect it's still the latter? Thanks.",
      "votes": 2,
      "replies": [
        {
          "id": 1037307,
          "postDate": "2020-10-04T20:15:40.313Z",
          "content": "<p>the latter</p>\n<p>actually not world space, as it starts with (0, 0), but rather agent coordination system with world coordination system rotation.</p>",
          "rawMarkdown": "the latter\n\nactually not world space, as it starts with (0, 0), but rather agent coordination system with world coordination system rotation.",
          "votes": 1
        },
        {
          "id": 1041325,
          "postDate": "2020-10-07T17:26:57.390Z",
          "content": "<p>I'm a bit confused now. Using the eval loop from the example notebook which uses the transform points function seems to still yield slightly incorrect transformation. ~1500 loss. without transform it is much worse, but not sure where I might be going wrong here. </p>\n<p>My process at this point, take raw outputs from dataloader during training, no transforms or anything. On validation I do the transform_points function with the matrix and centroid, but still results look weird. I also tried recreated a chopped dataset with the new version of l5kit. </p>",
          "rawMarkdown": "I'm a bit confused now. Using the eval loop from the example notebook which uses the transform points function seems to still yield slightly incorrect transformation. ~1500 loss. without transform it is much worse, but not sure where I might be going wrong here. \n\nMy process at this point, take raw outputs from dataloader during training, no transforms or anything. On validation I do the transform_points function with the matrix and centroid, but still results look weird. I also tried recreated a chopped dataset with the new version of l5kit. ",
          "votes": 1
        }
      ]
    },
    {
      "id": 1036398,
      "postDate": "2020-10-03T18:01:14.043Z",
      "content": "<p>I've updated my <a href=\"https://www.kaggle.com/pestipeti/lyft-l5kit-unofficial-fix\" target=\"_blank\">unofficial fix</a> notebook.  The newest version of l5kit is available. Torch with GPU is working.</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F864684%2Fae3751132ccea54f0f8fa1012d9e60cf%2Funofficial_fix.png?generation=1601747999743500&amp;alt=media\" alt=\"\"></p>",
      "rawMarkdown": "I've updated my [unofficial fix](https://www.kaggle.com/pestipeti/lyft-l5kit-unofficial-fix) notebook.  The newest version of l5kit is available. Torch with GPU is working.\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F864684%2Fae3751132ccea54f0f8fa1012d9e60cf%2Funofficial_fix.png?generation=1601747999743500&alt=media)",
      "votes": 1,
      "replies": [
        {
          "id": 1036408,
          "postDate": "2020-10-03T18:15:20.483Z",
          "content": "<p>awesome, thanks for your valuable contributions in this competition and for the l5kit. </p>",
          "rawMarkdown": "awesome, thanks for your valuable contributions in this competition and for the l5kit. ",
          "votes": 2
        },
        {
          "id": 1036409,
          "postDate": "2020-10-03T18:17:33.153Z",
          "content": "<p><a href=\"https://www.kaggle.com/ilu000\" target=\"_blank\">@ilu000</a> What is the difference to your mentioned solution?</p>",
          "rawMarkdown": "@ilu000 What is the difference to your mentioned solution?"
        },
        {
          "id": 1036425,
          "postDate": "2020-10-03T18:27:43.570Z",
          "content": "<p><a href=\"https://www.kaggle.com/pestipeti\" target=\"_blank\">@pestipeti</a> , your script does not work for me either. I stll get False when I use torch.cuda.is_available() please help.</p>",
          "rawMarkdown": "@pestipeti , your script does not work for me either. I stll get False when I use torch.cuda.is_available() please help."
        },
        {
          "id": 1036434,
          "postDate": "2020-10-03T18:35:40.897Z",
          "content": "<p><a href=\"https://www.kaggle.com/sheriytm\" target=\"_blank\">@sheriytm</a> <br>\nNo idea. I've just created a new notebook and it worked for me. You only have to add as dataset/external script (top right corner of the notebook editor). You don't have to install with pip. Other than this mistake I have no idea. Maybe try with an empty notebook (without your scripts; only the fix)</p>",
          "rawMarkdown": "@sheriytm \nNo idea. I've just created a new notebook and it worked for me. You only have to add as dataset/external script (top right corner of the notebook editor). You don't have to install with pip. Other than this mistake I have no idea. Maybe try with an empty notebook (without your scripts; only the fix)"
        },
        {
          "id": 1036480,
          "postDate": "2020-10-03T19:42:38.340Z",
          "content": "<p><a href=\"https://www.kaggle.com/pestipeti\" target=\"_blank\">@pestipeti</a>, thanks. It is working now.</p>",
          "rawMarkdown": "@pestipeti, thanks. It is working now."
        }
      ]
    },
    {
      "id": 1046773,
      "postDate": "2020-10-12T02:06:18.073Z",
      "content": "<p>Sorry if this has been asked somewhere, but what is the official way to install L5Kit on a Kaggle Kernel?<br>\nWhen I run <code>import l5kit</code> directly, it gives me<br>\n<code>ModuleNotFoundError: No module named 'l5kit'</code></p>",
      "rawMarkdown": "Sorry if this has been asked somewhere, but what is the official way to install L5Kit on a Kaggle Kernel?\nWhen I run `import l5kit` directly, it gives me\n```ModuleNotFoundError: No module named 'l5kit'```",
      "replies": [
        {
          "id": 1046950,
          "postDate": "2020-10-12T06:10:12.047Z",
          "content": "<p><code>!pip install l5kit</code> first ;)</p>\n<p>edit:<br>\nyou will need to remove the legacy package <code>typing</code> first as it will throw an error: <code>!pip uninstall -y typing</code></p>",
          "rawMarkdown": "`!pip install l5kit` first ;)\n\nedit:\nyou will need to remove the legacy package `typing` first as it will throw an error: `!pip uninstall -y typing`"
        },
        {
          "id": 1047024,
          "postDate": "2020-10-12T07:25:19.127Z",
          "content": "<p>Hmm… I tried the <code>pip install</code> and it didn't work<br>\n<code>ERROR: Could not find a version that satisfies the requirement l5kit (from versions: none)\nERROR: No matching distribution found for l5kit</code></p>\n<p>I actually found one of the competition host suggested to \"attach\" this <br>\n<a href=\"https://www.kaggle.com/philculliton/kaggle-l5kit\" target=\"_blank\">https://www.kaggle.com/philculliton/kaggle-l5kit</a><br>\nto your notebook as a utils. And, one notebook from corochann shows you can do it like<br>\n<a href=\"https://www.kaggle.com/corochann/lyft-comprehensive-guide-to-start-competition\" target=\"_blank\">https://www.kaggle.com/corochann/lyft-comprehensive-guide-to-start-competition</a><br>\nThis will be much faster than <code>!pip install l5kit</code><br>\nJust curious if the way suggested by corochann is what the host meant.</p>",
          "rawMarkdown": "Hmm... I tried the `pip install` and it didn't work\n```ERROR: Could not find a version that satisfies the requirement l5kit (from versions: none)\nERROR: No matching distribution found for l5kit```\n\nI actually found one of the competition host suggested to \"attach\" this \nhttps://www.kaggle.com/philculliton/kaggle-l5kit\nto your notebook as a utils. And, one notebook from corochann shows you can do it like\nhttps://www.kaggle.com/corochann/lyft-comprehensive-guide-to-start-competition\nThis will be much faster than `!pip install l5kit`\nJust curious if the way suggested by corochann is what the host meant."
        },
        {
          "id": 1047033,
          "postDate": "2020-10-12T07:37:32.097Z",
          "content": "<p>Remove the script (I had to create a new notebook because it didnt let me remove it)</p>\n<p>and use:</p>\n<pre><code>!pip uninstall -y typing\n!pip install l5kit\n</code></pre>\n<p>That should work. </p>",
          "rawMarkdown": "Remove the script (I had to create a new notebook because it didnt let me remove it)\n\nand use:\n\n```\n!pip uninstall -y typing\n!pip install l5kit\n```\n\nThat should work. ",
          "votes": 3
        },
        {
          "id": 1047103,
          "postDate": "2020-10-12T09:03:28.693Z",
          "content": "<p>Yes, you can use the utils as well. But the original version also throws an error when you use the GPU with Pytorch and Cuda.</p>\n<p><a href=\"https://www.kaggle.com/aliabdin1\" target=\"_blank\">@aliabdin1</a> s Solutions works well, and this is what I am doing too.</p>",
          "rawMarkdown": "Yes, you can use the utils as well. But the original version also throws an error when you use the GPU with Pytorch and Cuda.\n\n@aliabdin1 s Solutions works well, and this is what I am doing too.",
          "votes": 1
        }
      ]
    },
    {
      "id": 1035825,
      "postDate": "2020-10-03T06:11:18.653Z",
      "content": "<p>Thanks <a href=\"https://www.kaggle.com/lucabergamini\" target=\"_blank\">@lucabergamini</a> but the <a href=\"https://www.kaggle.com/c/lyft-motion-prediction-autonomous-vehicles/discussion/177125\" target=\"_blank\">cuda device error </a>is back with the new version.</p>",
      "rawMarkdown": "Thanks @lucabergamini but the [cuda device error ](https://www.kaggle.com/c/lyft-motion-prediction-autonomous-vehicles/discussion/177125)is back with the new version.",
      "replies": [
        {
          "id": 1035976,
          "postDate": "2020-10-03T09:54:38.197Z",
          "content": "<p>it's a bug from kaggle, not from the l5kit.<br>\nsolution: Using the pypy package instead of the util on kaggle.</p>\n<pre><code>!pip uninstall -y typing\n!pip install l5kit\n</code></pre>",
          "rawMarkdown": "it's a bug from kaggle, not from the l5kit.\nsolution: Using the pypy package instead of the util on kaggle.\n\n```\n!pip uninstall -y typing\n!pip install l5kit\n```"
        },
        {
          "id": 1036200,
          "postDate": "2020-10-03T14:26:28.987Z",
          "content": "<p>After removing the script I got: <code>Draft Session Fatal</code> restarting did not help, It just could not start the notebook without the script. So I created a new notebook and copied all cells and used <a href=\"https://www.kaggle.com/ilu000\" target=\"_blank\">@ilu000</a> solution. </p>\n<p>This works perfect, you will be able to use l5kit version <code>1.1.0</code> and make use of the GPU.</p>",
          "rawMarkdown": "After removing the script I got: `Draft Session Fatal` restarting did not help, It just could not start the notebook without the script. So I created a new notebook and copied all cells and used @ilu000 solution. \n\nThis works perfect, you will be able to use l5kit version `1.1.0` and make use of the GPU.\n"
        },
        {
          "id": 1036235,
          "postDate": "2020-10-03T14:54:07.063Z",
          "content": "<p><a href=\"https://www.kaggle.com/ilu000\" target=\"_blank\">@ilu000</a>, I have already used the above lines but I still get that error. Is there anything else that needs to be fixed?</p>\n<p>The error is:</p>\n<p><code>RuntimeError: Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is False. If you are running on a CPU-only machine, please use torch.load with map_location=torch.device('cpu') to map your storages to the CPU.</code></p>",
          "rawMarkdown": "@ilu000, I have already used the above lines but I still get that error. Is there anything else that needs to be fixed?\n\nThe error is:\n\n`RuntimeError: Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is False. If you are running on a CPU-only machine, please use torch.load with map_location=torch.device('cpu') to map your storages to the CPU.`"
        },
        {
          "id": 1036325,
          "postDate": "2020-10-03T16:32:40.037Z",
          "content": "<p>When I run \"torch.cuda.is_available()\", prints out False.</p>",
          "rawMarkdown": "When I run \"torch.cuda.is_available()\", prints out False."
        },
        {
          "id": 1036334,
          "postDate": "2020-10-03T16:49:20.157Z",
          "content": "<p>Did you remove the script ?</p>",
          "rawMarkdown": "Did you remove the script ?"
        },
        {
          "id": 1036342,
          "postDate": "2020-10-03T16:58:17.007Z",
          "content": "<p>I think the issue with the original Kaggle l5kit utility script was that PyTorch was being replaced with the CPU only version (as it force installed all dependencies). With l5kit 1.0.6 it explicitly limited PyTorch to 1.5 or below which is what's on Kaggle so no upgrade would normally occur. But l5kit 1.1.0 allows PyTorch 1.6 so it may be that PyTorch is being updated to the CPU only 1.6. You might try installing the CUDA version using the official URLs (on pytorch.org) after installing l5kit.</p>",
          "rawMarkdown": "I think the issue with the original Kaggle l5kit utility script was that PyTorch was being replaced with the CPU only version (as it force installed all dependencies). With l5kit 1.0.6 it explicitly limited PyTorch to 1.5 or below which is what's on Kaggle so no upgrade would normally occur. But l5kit 1.1.0 allows PyTorch 1.6 so it may be that PyTorch is being updated to the CPU only 1.6. You might try installing the CUDA version using the official URLs (on pytorch.org) after installing l5kit."
        },
        {
          "id": 1036482,
          "postDate": "2020-10-03T19:44:13.777Z",
          "content": "<p>Thanks <a href=\"https://www.kaggle.com/aliabdin1\" target=\"_blank\">@aliabdin1</a>, it worked once I removed the script. That was the issue.</p>",
          "rawMarkdown": "Thanks @aliabdin1, it worked once I removed the script. That was the issue."
        }
      ]
    },
    {
      "id": 1035718,
      "postDate": "2020-10-03T02:14:57.357Z",
      "content": "<p>Thanks for your update. That explains why my recent submission score is very high (above 1w).</p>",
      "rawMarkdown": "Thanks for your update. That explains why my recent submission score is very high (above 1w)."
    },
    {
      "id": 1034536,
      "postDate": "2020-10-01T21:32:05.187Z",
      "content": "<p>Great news! </p>",
      "rawMarkdown": "Great news! "
    },
    {
      "id": 1036108,
      "postDate": "2020-10-03T12:48:22.153Z",
      "rawMarkdown": "",
      "isDeleted": true
    },
    {
      "id": 1083584,
      "postDate": "2020-11-19T06:12:34.777Z",
      "content": "<p>Thank you!</p>",
      "rawMarkdown": "Thank you!"
    }
  ],
  "comments": [
    {
      "id": 1032773,
      "author_name": "Pascal Pfeiffer",
      "author_url": "",
      "post_date": "2020-09-30T12:44:33.173000",
      "content": "<p>Thanks for the quick update!</p>\n<p>I might have found an unintended change in the function <code>draw_trajectory()</code>:</p>\n<p>The old code:<br>\n<code>draw_trajectory(im, target_positions_pixels, sample[\"target_yaws\"], TARGET_POINTS_COLOR)</code></p>\n<p>throws the following error:</p>\n<pre><code>/kaggle/usr/lib/kaggle_l5kit/l5kit/visualization/utils.py in draw_trajectory(on_image, positions, rgb_color, radius, yaws)\n     70         for pos in positions:\n     71             pred_waypoint = pos[:2]\n---&gt; 72             cv2.circle(on_image, tuple(pred_waypoint.astype(np.int)), radius, rgb_color, -1)\nTypeError: Argument 'radius' is required to be an integer\n</code></pre>\n<p>As can be seen from the github, the yaws are now the 5th argument and no longer the 3rd argument for the drawing function. Was this an intended change?</p>\n<p>The new call must now be:<br>\n<code>draw_trajectory(im, target_positions_pixels, TARGET_POINTS_COLOR, radius=1, yaws=sample[\"target_yaws\"])</code></p>",
      "votes": 3,
      "replies": [
        {
          "id": 1032909,
          "author_name": "Luca Bergamini",
          "author_url": "",
          "post_date": "2020-09-30T14:03:31.103000",
          "content": "<p>That's intended, we also made the yaws optional as we don't predict them for this competition :) </p>",
          "votes": 2,
          "replies": []
        },
        {
          "id": 1032928,
          "author_name": "Pascal Pfeiffer",
          "author_url": "",
          "post_date": "2020-09-30T14:16:59.837000",
          "content": "<p>Ok, thanks for clarification. <br>\nI wasn't sure about it, as you released a MINOR update (hinting semver here) and the change in order wasn't really necessary for the function to work.</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 1037303,
      "author_name": "Tom Aindow",
      "author_url": "",
      "post_date": "2020-10-04T20:11:19.240000",
      "content": "<p>Hi guys, thanks for the update. Can you just confirm: are the ground truth files generated by create_chopped_dataset() in agent space or world space? I suspect it's still the latter? Thanks.</p>",
      "votes": 2,
      "replies": [
        {
          "id": 1037307,
          "author_name": "Pascal Pfeiffer",
          "author_url": "",
          "post_date": "2020-10-04T20:15:40.313000",
          "content": "<p>the latter</p>\n<p>actually not world space, as it starts with (0, 0), but rather agent coordination system with world coordination system rotation.</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 1041325,
          "author_name": "ryches",
          "author_url": "",
          "post_date": "2020-10-07T17:26:57.390000",
          "content": "<p>I'm a bit confused now. Using the eval loop from the example notebook which uses the transform points function seems to still yield slightly incorrect transformation. ~1500 loss. without transform it is much worse, but not sure where I might be going wrong here. </p>\n<p>My process at this point, take raw outputs from dataloader during training, no transforms or anything. On validation I do the transform_points function with the matrix and centroid, but still results look weird. I also tried recreated a chopped dataset with the new version of l5kit. </p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 1036398,
      "author_name": "Peter",
      "author_url": "",
      "post_date": "2020-10-03T18:01:14.043000",
      "content": "<p>I've updated my <a href=\"https://www.kaggle.com/pestipeti/lyft-l5kit-unofficial-fix\" target=\"_blank\">unofficial fix</a> notebook.  The newest version of l5kit is available. Torch with GPU is working.</p>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F864684%2Fae3751132ccea54f0f8fa1012d9e60cf%2Funofficial_fix.png?generation=1601747999743500&amp;alt=media\" alt=\"\"></p>",
      "votes": 1,
      "replies": [
        {
          "id": 1036408,
          "author_name": "Pascal Pfeiffer",
          "author_url": "",
          "post_date": "2020-10-03T18:15:20.483000",
          "content": "<p>awesome, thanks for your valuable contributions in this competition and for the l5kit. </p>",
          "votes": 2,
          "replies": []
        },
        {
          "id": 1036409,
          "author_name": "Ali Abdin",
          "author_url": "",
          "post_date": "2020-10-03T18:17:33.153000",
          "content": "<p><a href=\"https://www.kaggle.com/ilu000\" target=\"_blank\">@ilu000</a> What is the difference to your mentioned solution?</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1036425,
          "author_name": "YaGana Sheriff-Hussaini",
          "author_url": "",
          "post_date": "2020-10-03T18:27:43.570000",
          "content": "<p><a href=\"https://www.kaggle.com/pestipeti\" target=\"_blank\">@pestipeti</a> , your script does not work for me either. I stll get False when I use torch.cuda.is_available() please help.</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1036434,
          "author_name": "Peter",
          "author_url": "",
          "post_date": "2020-10-03T18:35:40.897000",
          "content": "<p><a href=\"https://www.kaggle.com/sheriytm\" target=\"_blank\">@sheriytm</a> <br>\nNo idea. I've just created a new notebook and it worked for me. You only have to add as dataset/external script (top right corner of the notebook editor). You don't have to install with pip. Other than this mistake I have no idea. Maybe try with an empty notebook (without your scripts; only the fix)</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1036480,
          "author_name": "YaGana Sheriff-Hussaini",
          "author_url": "",
          "post_date": "2020-10-03T19:42:38.340000",
          "content": "<p><a href=\"https://www.kaggle.com/pestipeti\" target=\"_blank\">@pestipeti</a>, thanks. It is working now.</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1046773,
      "author_name": "Louis Yang",
      "author_url": "",
      "post_date": "2020-10-12T02:06:18.073000",
      "content": "<p>Sorry if this has been asked somewhere, but what is the official way to install L5Kit on a Kaggle Kernel?<br>\nWhen I run <code>import l5kit</code> directly, it gives me<br>\n<code>ModuleNotFoundError: No module named 'l5kit'</code></p>",
      "votes": 0,
      "replies": [
        {
          "id": 1046950,
          "author_name": "Pascal Pfeiffer",
          "author_url": "",
          "post_date": "2020-10-12T06:10:12.047000",
          "content": "<p><code>!pip install l5kit</code> first ;)</p>\n<p>edit:<br>\nyou will need to remove the legacy package <code>typing</code> first as it will throw an error: <code>!pip uninstall -y typing</code></p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1047024,
          "author_name": "Louis Yang",
          "author_url": "",
          "post_date": "2020-10-12T07:25:19.127000",
          "content": "<p>Hmm… I tried the <code>pip install</code> and it didn't work<br>\n<code>ERROR: Could not find a version that satisfies the requirement l5kit (from versions: none)\nERROR: No matching distribution found for l5kit</code></p>\n<p>I actually found one of the competition host suggested to \"attach\" this <br>\n<a href=\"https://www.kaggle.com/philculliton/kaggle-l5kit\" target=\"_blank\">https://www.kaggle.com/philculliton/kaggle-l5kit</a><br>\nto your notebook as a utils. And, one notebook from corochann shows you can do it like<br>\n<a href=\"https://www.kaggle.com/corochann/lyft-comprehensive-guide-to-start-competition\" target=\"_blank\">https://www.kaggle.com/corochann/lyft-comprehensive-guide-to-start-competition</a><br>\nThis will be much faster than <code>!pip install l5kit</code><br>\nJust curious if the way suggested by corochann is what the host meant.</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1047033,
          "author_name": "Ali Abdin",
          "author_url": "",
          "post_date": "2020-10-12T07:37:32.097000",
          "content": "<p>Remove the script (I had to create a new notebook because it didnt let me remove it)</p>\n<p>and use:</p>\n<pre><code>!pip uninstall -y typing\n!pip install l5kit\n</code></pre>\n<p>That should work. </p>",
          "votes": 3,
          "replies": []
        },
        {
          "id": 1047103,
          "author_name": "Pascal Pfeiffer",
          "author_url": "",
          "post_date": "2020-10-12T09:03:28.693000",
          "content": "<p>Yes, you can use the utils as well. But the original version also throws an error when you use the GPU with Pytorch and Cuda.</p>\n<p><a href=\"https://www.kaggle.com/aliabdin1\" target=\"_blank\">@aliabdin1</a> s Solutions works well, and this is what I am doing too.</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 1035825,
      "author_name": "YaGana Sheriff-Hussaini",
      "author_url": "",
      "post_date": "2020-10-03T06:11:18.653000",
      "content": "<p>Thanks <a href=\"https://www.kaggle.com/lucabergamini\" target=\"_blank\">@lucabergamini</a> but the <a href=\"https://www.kaggle.com/c/lyft-motion-prediction-autonomous-vehicles/discussion/177125\" target=\"_blank\">cuda device error </a>is back with the new version.</p>",
      "votes": 0,
      "replies": [
        {
          "id": 1035976,
          "author_name": "Pascal Pfeiffer",
          "author_url": "",
          "post_date": "2020-10-03T09:54:38.197000",
          "content": "<p>it's a bug from kaggle, not from the l5kit.<br>\nsolution: Using the pypy package instead of the util on kaggle.</p>\n<pre><code>!pip uninstall -y typing\n!pip install l5kit\n</code></pre>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1036200,
          "author_name": "Ali Abdin",
          "author_url": "",
          "post_date": "2020-10-03T14:26:28.987000",
          "content": "<p>After removing the script I got: <code>Draft Session Fatal</code> restarting did not help, It just could not start the notebook without the script. So I created a new notebook and copied all cells and used <a href=\"https://www.kaggle.com/ilu000\" target=\"_blank\">@ilu000</a> solution. </p>\n<p>This works perfect, you will be able to use l5kit version <code>1.1.0</code> and make use of the GPU.</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1036235,
          "author_name": "YaGana Sheriff-Hussaini",
          "author_url": "",
          "post_date": "2020-10-03T14:54:07.063000",
          "content": "<p><a href=\"https://www.kaggle.com/ilu000\" target=\"_blank\">@ilu000</a>, I have already used the above lines but I still get that error. Is there anything else that needs to be fixed?</p>\n<p>The error is:</p>\n<p><code>RuntimeError: Attempting to deserialize object on a CUDA device but torch.cuda.is_available() is False. If you are running on a CPU-only machine, please use torch.load with map_location=torch.device('cpu') to map your storages to the CPU.</code></p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1036325,
          "author_name": "YaGana Sheriff-Hussaini",
          "author_url": "",
          "post_date": "2020-10-03T16:32:40.037000",
          "content": "<p>When I run \"torch.cuda.is_available()\", prints out False.</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1036334,
          "author_name": "Ali Abdin",
          "author_url": "",
          "post_date": "2020-10-03T16:49:20.157000",
          "content": "<p>Did you remove the script ?</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1036342,
          "author_name": "Thomas Brandon",
          "author_url": "",
          "post_date": "2020-10-03T16:58:17.007000",
          "content": "<p>I think the issue with the original Kaggle l5kit utility script was that PyTorch was being replaced with the CPU only version (as it force installed all dependencies). With l5kit 1.0.6 it explicitly limited PyTorch to 1.5 or below which is what's on Kaggle so no upgrade would normally occur. But l5kit 1.1.0 allows PyTorch 1.6 so it may be that PyTorch is being updated to the CPU only 1.6. You might try installing the CUDA version using the official URLs (on pytorch.org) after installing l5kit.</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 1036482,
          "author_name": "YaGana Sheriff-Hussaini",
          "author_url": "",
          "post_date": "2020-10-03T19:44:13.777000",
          "content": "<p>Thanks <a href=\"https://www.kaggle.com/aliabdin1\" target=\"_blank\">@aliabdin1</a>, it worked once I removed the script. That was the issue.</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 1035718,
      "author_name": "Matrix",
      "author_url": "",
      "post_date": "2020-10-03T02:14:57.357000",
      "content": "<p>Thanks for your update. That explains why my recent submission score is very high (above 1w).</p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1034536,
      "author_name": "Ali Abdin",
      "author_url": "",
      "post_date": "2020-10-01T21:32:05.187000",
      "content": "<p>Great news! </p>",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1036108,
      "author_name": "",
      "author_url": "",
      "post_date": "2020-10-03T12:48:22.153000",
      "content": "",
      "votes": 0,
      "replies": []
    },
    {
      "id": 1083584,
      "author_name": "ChuqiZhang",
      "author_url": "",
      "post_date": "2020-11-19T06:12:34.777000",
      "content": "<p>Thank you!</p>",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1032749": "Hey  everyone,\n\nYesterday we shipped a new L5Kit release (1.1.0) both on pypi and Kaggle.\nYou can check which version you're using in your kernels by running:\n```python\nimport l5kit\nprint(l5kit.__version__)\n``` \n\nIf you're running 1.1.0 please take a look at:\n- [the release notes](https://github.com/lyft/l5kit/releases/tag/v1.1.0);\n- [the coords_systems doc](https://github.com/lyft/l5kit/blob/master/coords_systems.md);\n- [the data_format doc](https://github.com/lyft/l5kit/blob/master/data_format.md);\n\nThe biggest breaking change is that **target_positions are now in a new agent space and not in world space anymore**. This is to address a misalignment between inputs and predictions (see [this post](https://www.kaggle.com/c/lyft-motion-prediction-autonomous-vehicles/discussion/186492) and kudos to @zaharch to have raised the issue) As we're not going to change the GT on Kaggle (i.e. it will stay in world displacements) you will need to convert your predictions back to that space (if you're predicting in this new space) before submitting. You can find examples on how to do that:\n- in L5Kit [prediction notebook](https://github.com/lyft/l5kit/blob/master/examples/agent_motion_prediction/agent_motion_prediction.ipynb);\n- in my [Kaggle Kernel](https://www.kaggle.com/lucabergamini/lyft-baseline-09-02?scriptVersionId=43751473). Please be sure to be on **version 7** (It's currently running, hopefully it will finish soon).\n\nIf you have questions related to these changes please reply to this post and I'll do my best to address them :) As always, please report to the [GitHub page of L5kit](https://github.com/lyft/l5kit) if you find any bugs.",
    "1032773": "Thanks for the quick update!\n\nI might have found an unintended change in the function `draw_trajectory()`:\n\nThe old code:\n`draw_trajectory(im, target_positions_pixels, sample[\"target_yaws\"], TARGET_POINTS_COLOR)`\n\nthrows the following error:\n```\n/kaggle/usr/lib/kaggle_l5kit/l5kit/visualization/utils.py in draw_trajectory(on_image, positions, rgb_color, radius, yaws)\n     70         for pos in positions:\n     71             pred_waypoint = pos[:2]\n---> 72             cv2.circle(on_image, tuple(pred_waypoint.astype(np.int)), radius, rgb_color, -1)\nTypeError: Argument 'radius' is required to be an integer\n```\n\nAs can be seen from the github, the yaws are now the 5th argument and no longer the 3rd argument for the drawing function. Was this an intended change?\n\nThe new call must now be:\n`draw_trajectory(im, target_positions_pixels, TARGET_POINTS_COLOR, radius=1, yaws=sample[\"target_yaws\"])`",
    "1037303": "Hi guys, thanks for the update. Can you just confirm: are the ground truth files generated by create_chopped_dataset() in agent space or world space? I suspect it's still the latter? Thanks.",
    "1036398": "I've updated my [unofficial fix](https://www.kaggle.com/pestipeti/lyft-l5kit-unofficial-fix) notebook.  The newest version of l5kit is available. Torch with GPU is working.\n\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F864684%2Fae3751132ccea54f0f8fa1012d9e60cf%2Funofficial_fix.png?generation=1601747999743500&alt=media)",
    "1046773": "Sorry if this has been asked somewhere, but what is the official way to install L5Kit on a Kaggle Kernel?\nWhen I run `import l5kit` directly, it gives me\n```ModuleNotFoundError: No module named 'l5kit'```",
    "1035825": "Thanks @lucabergamini but the [cuda device error ](https://www.kaggle.com/c/lyft-motion-prediction-autonomous-vehicles/discussion/177125)is back with the new version.",
    "1035718": "Thanks for your update. That explains why my recent submission score is very high (above 1w).",
    "1034536": "Great news! ",
    "1036108": "",
    "1083584": "Thank you!"
  }
}