{
  "id": 159469,
  "title": "problem with importing transformers ",
  "url": "/competitions/jigsaw-multilingual-toxic-comment-classification/discussion/159469",
  "author_name": "Ruchith",
  "post_date": "2020-06-17T14:40:11.474000",
  "votes": 0,
  "comment_count": 0,
  "views": 0,
  "content": "<p>I am trying to use Tpu with PyTorch. I used the following command to install xla:\n<code>!curl https://raw.githubusercontent.com/pytorch/xla/master/contrib/scripts/env-setup.py -o pytorch-xla-env-setup.py</code>\n<code>!python pytorch-xla-env-setup.py --version nightly --apt-packages libomp5 libopenblas-dev</code>\n<code>!export XLA_USE_BF16=1</code>\nbut when I try to import Transformers using: <code>import transformers</code>\nmy notebook is being restarted automatically.</p>\n\n<p>the issue doesn't arise when being run on CPU </p>\n\n<p>anyone facing similar issue?</p>",
  "messages": [
    {
      "id": 890509,
      "postDate": "2020-06-17T14:40:11.473Z",
      "content": "<p>I am trying to use Tpu with PyTorch. I used the following command to install xla:\n<code>!curl https://raw.githubusercontent.com/pytorch/xla/master/contrib/scripts/env-setup.py -o pytorch-xla-env-setup.py</code>\n<code>!python pytorch-xla-env-setup.py --version nightly --apt-packages libomp5 libopenblas-dev</code>\n<code>!export XLA_USE_BF16=1</code>\nbut when I try to import Transformers using: <code>import transformers</code>\nmy notebook is being restarted automatically.</p>\n\n<p>the issue doesn't arise when being run on CPU </p>\n\n<p>anyone facing similar issue?</p>",
      "rawMarkdown": "I am trying to use Tpu with PyTorch. I used the following command to install xla:\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 nightly --apt-packages libomp5 libopenblas-dev`\n`!export XLA_USE_BF16=1`\nbut when I try to import Transformers using: `import transformers`\nmy notebook is being restarted automatically.\n\nthe issue doesn't arise when being run on CPU \n\nanyone facing similar issue?\n"
    }
  ],
  "comments": [],
  "raw_markdown_by_id": {
    "890509": "I am trying to use Tpu with PyTorch. I used the following command to install xla:\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 nightly --apt-packages libomp5 libopenblas-dev`\n`!export XLA_USE_BF16=1`\nbut when I try to import Transformers using: `import transformers`\nmy notebook is being restarted automatically.\n\nthe issue doesn't arise when being run on CPU \n\nanyone facing similar issue?\n"
  }
}