{
  "id": 177613,
  "title": "MacOS agent_motion_prediction crashes",
  "url": "/competitions/lyft-motion-prediction-autonomous-vehicles/discussion/177613",
  "author_name": "",
  "post_date": "2020-08-26T15:52:45.617831800Z",
  "votes": null,
  "comment_count": 6,
  "views": 0,
  "content": "<p>When I run the agent_motion_prediction on MacOS 10.15.6 it crashed and stops the kernel. <br>\nI have included <br>\nimport cv2<br>\ncv2.setNumThreads(0)</p>\n<p>in the cell before the train loop.<br>\nIs there any work around for this. <img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F5558478%2F134cc6c534e6792a4ab09c234c470a66%2FScreen%20Shot%202020-08-26%20at%209.50.19%20AM.png?generation=1598457090808877&amp;alt=media\" alt=\"\"></p>",
  "messages": [
    {
      "id": "986576",
      "postDate": "08/26/2020 15:52:45",
      "content": "<p>When I run the agent_motion_prediction on MacOS 10.15.6 it crashed and stops the kernel. <br>\nI have included <br>\nimport cv2<br>\ncv2.setNumThreads(0)</p>\n<p>in the cell before the train loop.<br>\nIs there any work around for this. <img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F5558478%2F134cc6c534e6792a4ab09c234c470a66%2FScreen%20Shot%202020-08-26%20at%209.50.19%20AM.png?generation=1598457090808877&amp;alt=media\" alt=\"\"></p>",
      "rawMarkdown": "When I run the agent_motion_prediction on MacOS 10.15.6 it crashed and stops the kernel. \nI have included \nimport cv2\ncv2.setNumThreads(0)\n\nin the cell before the train loop.\nIs there any work around for this. ![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F5558478%2F134cc6c534e6792a4ab09c234c470a66%2FScreen%20Shot%202020-08-26%20at%209.50.19%20AM.png?generation=1598457090808877&alt=media)",
      "votes": null
    },
    {
      "id": "986679",
      "postDate": "08/26/2020 17:21:28",
      "content": "<p>Hi <a href=\"https://www.kaggle.com/srinivasgopalkrishna\" target=\"_blank\">@srinivasgopalkrishna</a>,<br>\nIn my experiments setting <code>cv2.SetNumThreads(0)</code> did the trick. <br>\nAnother thing you can try is setting the <code>num_workers</code> in your dataloader to 0 (but it will slow your training).<br>\nCan I ask you which version of python are you running?</p>",
      "rawMarkdown": "Hi @srinivasgopalkrishna,\nIn my experiments setting `cv2.SetNumThreads(0)` did the trick. \nAnother thing you can try is setting the `num_workers` in your dataloader to 0 (but it will slow your training).\nCan I ask you which version of python are you running?",
      "votes": null
    },
    {
      "id": "986769",
      "postDate": "08/26/2020 19:06:09",
      "content": "<p>Luca<br>\nI am running python version 3.7.6 . I will try to change the <code>num_workers</code> and see if it resolves this temporarily. </p>",
      "rawMarkdown": "Luca\nI am running python version 3.7.6 . I will try to change the `num_workers` and see if it resolves this temporarily.",
      "votes": null
    },
    {
      "id": "988250",
      "postDate": "08/27/2020 23:21:09",
      "content": "<p>Hi <a href=\"https://www.kaggle.com/lucabergamini\" target=\"_blank\">@lucabergamini</a> <br>\n I changed the <code>num_workers</code> to 0 and still the kernel dies. </p>",
      "rawMarkdown": "Hi @lucabergamini \n I changed the `num_workers` to 0 and still the kernel dies.",
      "votes": null
    },
    {
      "id": "989462",
      "postDate": "08/28/2020 20:01:45",
      "content": "<p>Hi <a href=\"https://www.kaggle.com/lucabergamini\" target=\"_blank\">@lucabergamini</a> <br>\nI changed the num_workers to 0 and still the kernel dies.</p>",
      "rawMarkdown": "Hi @lucabergamini \nI changed the num_workers to 0 and still the kernel dies.",
      "votes": null
    },
    {
      "id": "994082",
      "postDate": "09/01/2020 11:00:25",
      "content": "<p>Hey, sorry for the late reply. I'll give it a go with 3.7 today (hopefully)</p>",
      "rawMarkdown": "Hey, sorry for the late reply. I'll give it a go with 3.7 today (hopefully)",
      "votes": null
    },
    {
      "id": "994345",
      "postDate": "09/01/2020 14:30:08",
      "content": "<p>Hi <a href=\"https://www.kaggle.com/srinivasgopalkrishna\" target=\"_blank\">@srinivasgopalkrishna</a> I've given 3.7.6 a try on my macOS machine but I didn't find any issue in running  the notebook both with <code>py_semantic</code> and <code>py_satellite</code> (here I had to apply the cv2 patch). Can you maybe open an <a href=\"https://github.com/lyft/l5kit/issues\" target=\"_blank\">issue</a> on GitHub for this?</p>",
      "rawMarkdown": "Hi @srinivasgopalkrishna I've given 3.7.6 a try on my macOS machine but I didn't find any issue in running  the notebook both with `py_semantic` and `py_satellite` (here I had to apply the cv2 patch). Can you maybe open an [issue](https://github.com/lyft/l5kit/issues) on GitHub for this?",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 986679,
      "author_name": "lucabergamini",
      "author_url": "",
      "post_date": "08/26/2020 17:21:28",
      "content": "<p>Hi <a href=\"https://www.kaggle.com/srinivasgopalkrishna\" target=\"_blank\">@srinivasgopalkrishna</a>,<br>\nIn my experiments setting <code>cv2.SetNumThreads(0)</code> did the trick. <br>\nAnother thing you can try is setting the <code>num_workers</code> in your dataloader to 0 (but it will slow your training).<br>\nCan I ask you which version of python are you running?</p>",
      "votes": null,
      "replies": [
        {
          "id": 989462,
          "author_name": "srinivasgopalkrishna",
          "author_url": "",
          "post_date": "08/28/2020 20:01:45",
          "content": "<p>Hi <a href=\"https://www.kaggle.com/lucabergamini\" target=\"_blank\">@lucabergamini</a> <br>\nI changed the num_workers to 0 and still the kernel dies.</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 986769,
      "author_name": "srinivasgopalkrishna",
      "author_url": "",
      "post_date": "08/26/2020 19:06:09",
      "content": "<p>Luca<br>\nI am running python version 3.7.6 . I will try to change the <code>num_workers</code> and see if it resolves this temporarily. </p>",
      "votes": null,
      "replies": [
        {
          "id": 994082,
          "author_name": "lucabergamini",
          "author_url": "",
          "post_date": "09/01/2020 11:00:25",
          "content": "<p>Hey, sorry for the late reply. I'll give it a go with 3.7 today (hopefully)</p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 994345,
          "author_name": "lucabergamini",
          "author_url": "",
          "post_date": "09/01/2020 14:30:08",
          "content": "<p>Hi <a href=\"https://www.kaggle.com/srinivasgopalkrishna\" target=\"_blank\">@srinivasgopalkrishna</a> I've given 3.7.6 a try on my macOS machine but I didn't find any issue in running  the notebook both with <code>py_semantic</code> and <code>py_satellite</code> (here I had to apply the cv2 patch). Can you maybe open an <a href=\"https://github.com/lyft/l5kit/issues\" target=\"_blank\">issue</a> on GitHub for this?</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 988250,
      "author_name": "srinivasgopalkrishna",
      "author_url": "",
      "post_date": "08/27/2020 23:21:09",
      "content": "<p>Hi <a href=\"https://www.kaggle.com/lucabergamini\" target=\"_blank\">@lucabergamini</a> <br>\n I changed the <code>num_workers</code> to 0 and still the kernel dies. </p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "986576": "When I run the agent_motion_prediction on MacOS 10.15.6 it crashed and stops the kernel. \nI have included \nimport cv2\ncv2.setNumThreads(0)\n\nin the cell before the train loop.\nIs there any work around for this. ![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F5558478%2F134cc6c534e6792a4ab09c234c470a66%2FScreen%20Shot%202020-08-26%20at%209.50.19%20AM.png?generation=1598457090808877&alt=media)",
    "986679": "Hi @srinivasgopalkrishna,\nIn my experiments setting `cv2.SetNumThreads(0)` did the trick. \nAnother thing you can try is setting the `num_workers` in your dataloader to 0 (but it will slow your training).\nCan I ask you which version of python are you running?",
    "986769": "Luca\nI am running python version 3.7.6 . I will try to change the `num_workers` and see if it resolves this temporarily.",
    "988250": "Hi @lucabergamini \n I changed the `num_workers` to 0 and still the kernel dies.",
    "989462": "Hi @lucabergamini \nI changed the num_workers to 0 and still the kernel dies.",
    "994082": "Hey, sorry for the late reply. I'll give it a go with 3.7 today (hopefully)",
    "994345": "Hi @srinivasgopalkrishna I've given 3.7.6 a try on my macOS machine but I didn't find any issue in running  the notebook both with `py_semantic` and `py_satellite` (here I had to apply the cv2 patch). Can you maybe open an [issue](https://github.com/lyft/l5kit/issues) on GitHub for this?"
  },
  "source": "meta"
}