{
  "id": 300918,
  "title": "YOLOv5 on Google Colaboratory Issue and error handling",
  "url": "/competitions/tensorflow-great-barrier-reef/discussion/300918",
  "author_name": "asataka",
  "post_date": "2022-01-14T22:25:41.845000",
  "votes": 1,
  "comment_count": 0,
  "views": 0,
  "content": "<p>When using yolo5 on Google Colaboratory environment, I faced a  reported bug and find solution.<br>\nYou also may need to handle this issue, then you need is changing version of PyYAML library.<br>\nI hope below prescription helps you guys, Thanks competitors!!!</p>\n<p><strong>Code :</strong></p>\n<pre><code>!python train.py -hogehoge\n</code></pre>\n<p><strong>Error :</strong></p>\n<pre><code>Traceback (most recent call last):\n  File \"train.py\", line 404, in &lt;module&gt;\n    train(hyp)\n  File \"train.py\", line 57, in train\n    yaml.dump(hyp, f, sort_keys=False)\n  File \"/usr/local/lib/python3.6/dist-packages/yaml/__init__.py\", line 200, in dump\n    return dump_all([data], stream, Dumper=Dumper, **kwds)\nTypeError: dump_all() got an unexpected keyword argument 'sort_keys'\n</code></pre>\n<p><strong>Prescription</strong><br>\nRun below pip command to fix PyYAML library version from default on Google Colaboratory.</p>\n<pre><code>!pip install PyYAML==5.4.1 \n</code></pre>\n<p>More information and discussions on YOLOv5 repo. <br>\n<a href=\"url\" target=\"_blank\">https://github.com/ultralytics/yolov5/issues/414</a></p>",
  "messages": [
    {
      "id": 1650208,
      "postDate": "2022-01-14T22:25:41.847Z",
      "content": "<p>When using yolo5 on Google Colaboratory environment, I faced a  reported bug and find solution.<br>\nYou also may need to handle this issue, then you need is changing version of PyYAML library.<br>\nI hope below prescription helps you guys, Thanks competitors!!!</p>\n<p><strong>Code :</strong></p>\n<pre><code>!python train.py -hogehoge\n</code></pre>\n<p><strong>Error :</strong></p>\n<pre><code>Traceback (most recent call last):\n  File \"train.py\", line 404, in &lt;module&gt;\n    train(hyp)\n  File \"train.py\", line 57, in train\n    yaml.dump(hyp, f, sort_keys=False)\n  File \"/usr/local/lib/python3.6/dist-packages/yaml/__init__.py\", line 200, in dump\n    return dump_all([data], stream, Dumper=Dumper, **kwds)\nTypeError: dump_all() got an unexpected keyword argument 'sort_keys'\n</code></pre>\n<p><strong>Prescription</strong><br>\nRun below pip command to fix PyYAML library version from default on Google Colaboratory.</p>\n<pre><code>!pip install PyYAML==5.4.1 \n</code></pre>\n<p>More information and discussions on YOLOv5 repo. <br>\n<a href=\"url\" target=\"_blank\">https://github.com/ultralytics/yolov5/issues/414</a></p>",
      "rawMarkdown": "When using yolo5 on Google Colaboratory environment, I faced a  reported bug and find solution.\nYou also may need to handle this issue, then you need is changing version of PyYAML library.\nI hope below prescription helps you guys, Thanks competitors!!!\n\n**Code :**\n```\n!python train.py -hogehoge\n```\n\n**Error :**\n```\nTraceback (most recent call last):\n  File \"train.py\", line 404, in <module>\n    train(hyp)\n  File \"train.py\", line 57, in train\n    yaml.dump(hyp, f, sort_keys=False)\n  File \"/usr/local/lib/python3.6/dist-packages/yaml/__init__.py\", line 200, in dump\n    return dump_all([data], stream, Dumper=Dumper, **kwds)\nTypeError: dump_all() got an unexpected keyword argument 'sort_keys'\n```\n\n**Prescription**\nRun below pip command to fix PyYAML library version from default on Google Colaboratory.\n```\n!pip install PyYAML==5.4.1 \n\n```\n\nMore information and discussions on YOLOv5 repo. \n[https://github.com/ultralytics/yolov5/issues/414](url)",
      "votes": 1
    }
  ],
  "comments": [],
  "raw_markdown_by_id": {
    "1650208": "When using yolo5 on Google Colaboratory environment, I faced a  reported bug and find solution.\nYou also may need to handle this issue, then you need is changing version of PyYAML library.\nI hope below prescription helps you guys, Thanks competitors!!!\n\n**Code :**\n```\n!python train.py -hogehoge\n```\n\n**Error :**\n```\nTraceback (most recent call last):\n  File \"train.py\", line 404, in <module>\n    train(hyp)\n  File \"train.py\", line 57, in train\n    yaml.dump(hyp, f, sort_keys=False)\n  File \"/usr/local/lib/python3.6/dist-packages/yaml/__init__.py\", line 200, in dump\n    return dump_all([data], stream, Dumper=Dumper, **kwds)\nTypeError: dump_all() got an unexpected keyword argument 'sort_keys'\n```\n\n**Prescription**\nRun below pip command to fix PyYAML library version from default on Google Colaboratory.\n```\n!pip install PyYAML==5.4.1 \n\n```\n\nMore information and discussions on YOLOv5 repo. \n[https://github.com/ultralytics/yolov5/issues/414](url)"
  }
}