{
  "id": 220324,
  "title": "Using Pytorch with TPU + timm module, import error issue",
  "url": "/competitions/cassava-leaf-disease-classification/discussion/220324",
  "author_name": "",
  "post_date": "2021-02-18T02:19:24.491350100Z",
  "votes": 6,
  "comment_count": 1,
  "views": 0,
  "content": "<p>Solution) use this code.</p>\n<p>VERSION = \"20210201\"<br>\n!curl <a href=\"https://raw.githubusercontent.com/pytorch/xla/master/contrib/scripts/env-setup.py\" target=\"_blank\">https://raw.githubusercontent.com/pytorch/xla/master/contrib/scripts/env-setup.py</a> -o pytorch-xla-env-setup.py<br>\n!python pytorch-xla-env-setup.py --version $VERSION</p>\n<p>What's the problem? &gt;&gt;&gt;<br>\npreviously when setup pytorch-xla-env-setup.py, torch-1.8.0a0+unknown installed.</p>\n<p>but now if you use this code,</p>\n<p>!python pytorch-xla-env-setup.py --version nightly --apt-packages libomp5 libopenblas-dev</p>\n<p>install  torch-1.9.0a0+35b0560 now.<br>\nSo I recommend use previous version setup.</p>\n<p>p.s this is my first discussion. If this tip is helpful, feel free to upvote :)<br>\n      thanks!</p>\n<p>p.s 2 this is error code<br>\nimporterror: cannot import name 'container_abcs' from 'torch._six'</p>",
  "messages": [
    {
      "id": "1207733",
      "postDate": "02/18/2021 02:19:24",
      "content": "<p>Solution) use this code.</p>\n<p>VERSION = \"20210201\"<br>\n!curl <a href=\"https://raw.githubusercontent.com/pytorch/xla/master/contrib/scripts/env-setup.py\" target=\"_blank\">https://raw.githubusercontent.com/pytorch/xla/master/contrib/scripts/env-setup.py</a> -o pytorch-xla-env-setup.py<br>\n!python pytorch-xla-env-setup.py --version $VERSION</p>\n<p>What's the problem? &gt;&gt;&gt;<br>\npreviously when setup pytorch-xla-env-setup.py, torch-1.8.0a0+unknown installed.</p>\n<p>but now if you use this code,</p>\n<p>!python pytorch-xla-env-setup.py --version nightly --apt-packages libomp5 libopenblas-dev</p>\n<p>install  torch-1.9.0a0+35b0560 now.<br>\nSo I recommend use previous version setup.</p>\n<p>p.s this is my first discussion. If this tip is helpful, feel free to upvote :)<br>\n      thanks!</p>\n<p>p.s 2 this is error code<br>\nimporterror: cannot import name 'container_abcs' from 'torch._six'</p>",
      "rawMarkdown": "Solution) use this code.\n\n\nVERSION = \"20210201\"\n!curl https://raw.githubusercontent.com/pytorch/xla/master/contrib/scripts/env-setup.py -o pytorch-xla-env-setup.py\n!python pytorch-xla-env-setup.py --version $VERSION\n\n\n\nWhat's the problem? >>>\npreviously when setup pytorch-xla-env-setup.py, torch-1.8.0a0+unknown installed.\n\nbut now if you use this code,\n\n!python pytorch-xla-env-setup.py --version nightly --apt-packages libomp5 libopenblas-dev\n\ninstall  torch-1.9.0a0+35b0560 now.\nSo I recommend use previous version setup.\n\n\np.s this is my first discussion. If this tip is helpful, feel free to upvote :)\n      thanks!\n\n\np.s 2 this is error code\nimporterror: cannot import name 'container_abcs' from 'torch._six'",
      "votes": null
    },
    {
      "id": "1208046",
      "postDate": "02/18/2021 06:12:20",
      "content": "<p>hello<br>\nIs it possible to import timm with this code?</p>\n<blockquote>\n  <p>!pip install git+<a href=\"https://github.com/rwightman/pytorch-image-models.git\" target=\"_blank\">https://github.com/rwightman/pytorch-image-models.git</a></p>\n</blockquote>\n<p>You can get the latest version corresponding to the specification change</p>",
      "rawMarkdown": "hello\nIs it possible to import timm with this code?\n\n> !pip install git+https://github.com/rwightman/pytorch-image-models.git\n\nYou can get the latest version corresponding to the specification change",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 1208046,
      "author_name": "teyosan1229",
      "author_url": "",
      "post_date": "02/18/2021 06:12:20",
      "content": "<p>hello<br>\nIs it possible to import timm with this code?</p>\n<blockquote>\n  <p>!pip install git+<a href=\"https://github.com/rwightman/pytorch-image-models.git\" target=\"_blank\">https://github.com/rwightman/pytorch-image-models.git</a></p>\n</blockquote>\n<p>You can get the latest version corresponding to the specification change</p>",
      "votes": null,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "1207733": "Solution) use this code.\n\n\nVERSION = \"20210201\"\n!curl https://raw.githubusercontent.com/pytorch/xla/master/contrib/scripts/env-setup.py -o pytorch-xla-env-setup.py\n!python pytorch-xla-env-setup.py --version $VERSION\n\n\n\nWhat's the problem? >>>\npreviously when setup pytorch-xla-env-setup.py, torch-1.8.0a0+unknown installed.\n\nbut now if you use this code,\n\n!python pytorch-xla-env-setup.py --version nightly --apt-packages libomp5 libopenblas-dev\n\ninstall  torch-1.9.0a0+35b0560 now.\nSo I recommend use previous version setup.\n\n\np.s this is my first discussion. If this tip is helpful, feel free to upvote :)\n      thanks!\n\n\np.s 2 this is error code\nimporterror: cannot import name 'container_abcs' from 'torch._six'",
    "1208046": "hello\nIs it possible to import timm with this code?\n\n> !pip install git+https://github.com/rwightman/pytorch-image-models.git\n\nYou can get the latest version corresponding to the specification change"
  },
  "source": "meta"
}