{
  "id": 129871,
  "title": "Can we use TPU to train models with PyTorch?",
  "url": "/competitions/deepfake-detection-challenge/discussion/129871",
  "author_name": "Hieu Phung",
  "post_date": "2020-02-11T04:17:53.851000",
  "votes": 8,
  "comment_count": 9,
  "views": 0,
  "content": "<p>So this morning, according to my time-zone, Kaggle've added TPU accelerator option in everyone's notebooks and each kaggler has provided 30 hours/week quota for using it. I know the easiest and most effective way to take advantage of TPU is constructing and training models by using Tensorflow or Keras; however, can someone who still wants to stick to using PyTorch utilize the TPU's power?</p>\n\n<p>UPDATE: Thanks to <a href=\"/adityaecdrid\">@adityaecdrid</a>, we are coming closer to being able to use TPU with PyTorch. For more detail, let read the instructions <a href=\"https://www.kaggle.com/c/flower-classification-with-tpus/discussion/129820\">here</a>.</p>",
  "messages": [
    {
      "id": 742083,
      "postDate": "2020-02-11T04:17:53.850Z",
      "content": "<p>So this morning, according to my time-zone, Kaggle've added TPU accelerator option in everyone's notebooks and each kaggler has provided 30 hours/week quota for using it. I know the easiest and most effective way to take advantage of TPU is constructing and training models by using Tensorflow or Keras; however, can someone who still wants to stick to using PyTorch utilize the TPU's power?</p>\n\n<p>UPDATE: Thanks to <a href=\"/adityaecdrid\">@adityaecdrid</a>, we are coming closer to being able to use TPU with PyTorch. For more detail, let read the instructions <a href=\"https://www.kaggle.com/c/flower-classification-with-tpus/discussion/129820\">here</a>.</p>",
      "rawMarkdown": "So this morning, according to my time-zone, Kaggle've added TPU accelerator option in everyone's notebooks and each kaggler has provided 30 hours/week quota for using it. I know the easiest and most effective way to take advantage of TPU is constructing and training models by using Tensorflow or Keras; however, can someone who still wants to stick to using PyTorch utilize the TPU's power?\n\nUPDATE: Thanks to @adityaecdrid, we are coming closer to being able to use TPU with PyTorch. For more detail, let read the instructions [here](https://www.kaggle.com/c/flower-classification-with-tpus/discussion/129820).",
      "votes": 8
    },
    {
      "id": 743328,
      "postDate": "2020-02-12T01:47:58.413Z",
      "content": "<p>Yes, it looks like others have <a href=\"https://www.kaggle.com/c/flower-classification-with-tpus/discussion/129820\">gotten it to work in Kaggle Notebooks</a> on the Flower Classification competition.</p>",
      "rawMarkdown": "Yes, it looks like others have [gotten it to work in Kaggle Notebooks](https://www.kaggle.com/c/flower-classification-with-tpus/discussion/129820) on the Flower Classification competition.",
      "votes": 1,
      "replies": [
        {
          "id": 743335,
          "postDate": "2020-02-12T01:56:19.633Z",
          "content": "<p>Looks promising! Thanks for his work, we can successfully install PyTorch-XLA in a kernel; however, it's not being able to use for now. Maybe, we need some more configurations and/or official support from Kaggle.</p>",
          "rawMarkdown": "Looks promising! Thanks for his work, we can successfully install PyTorch-XLA in a kernel; however, it's not being able to use for now. Maybe, we need some more configurations and/or official support from Kaggle."
        },
        {
          "id": 744299,
          "postDate": "2020-02-12T17:54:01.227Z",
          "content": "<p>No unfortunately they have not. PyTorch support for TPUs is not something we have on Kaggle yet.</p>",
          "rawMarkdown": "No unfortunately they have not. PyTorch support for TPUs is not something we have on Kaggle yet.",
          "votes": 1
        },
        {
          "id": 744682,
          "postDate": "2020-02-13T03:12:24.117Z",
          "content": "<p>Supporting in the near future, maybe?</p>",
          "rawMarkdown": "Supporting in the near future, maybe?"
        }
      ]
    },
    {
      "id": 742181,
      "postDate": "2020-02-11T06:07:39.147Z",
      "content": "<p>I  remember   once  there  is a  news  that   we  can  use  Google's  TPU  with  pytorch .</p>\n\n<p><a href=\"https://github.com/pytorch/xla\">view  this  github  </a></p>",
      "rawMarkdown": "I  remember   once  there  is a  news  that   we  can  use  Google's  TPU  with  pytorch .\n\n[view  this  github  ](https://github.com/pytorch/xla)",
      "votes": 1,
      "replies": [
        {
          "id": 742542,
          "postDate": "2020-02-11T11:15:53.983Z",
          "content": "<p>Sadly, it doesn't work in Kaggle's notebooks 😂, for now.</p>",
          "rawMarkdown": "Sadly, it doesn't work in Kaggle's notebooks 😂, for now."
        },
        {
          "id": 742551,
          "postDate": "2020-02-11T11:20:24.740Z",
          "content": "<p>Oh,  that's  so  sad .</p>",
          "rawMarkdown": "Oh,  that's  so  sad ."
        }
      ]
    },
    {
      "id": 770144,
      "postDate": "2020-03-12T16:02:21.223Z",
      "content": "<p>More info here: <a href=\"https://www.kaggle.com/c/flower-classification-with-tpus/discussion/133777\">https://www.kaggle.com/c/flower-classification-with-tpus/discussion/133777</a>\nI'll be posting updates there as work on PyTorch-XLA continues.</p>",
      "rawMarkdown": "More info here: https://www.kaggle.com/c/flower-classification-with-tpus/discussion/133777\nI'll be posting updates there as work on PyTorch-XLA continues.",
      "votes": 1
    },
    {
      "id": 769565,
      "postDate": "2020-03-12T02:34:37.057Z",
      "content": "<p>I got same question since GPU credits have been used up.</p>",
      "rawMarkdown": "I got same question since GPU credits have been used up.",
      "votes": 1,
      "isDeleted": true
    }
  ],
  "comments": [
    {
      "id": 743328,
      "author_name": "Julia Elliott",
      "author_url": "",
      "post_date": "2020-02-12T01:47:58.413000",
      "content": "<p>Yes, it looks like others have <a href=\"https://www.kaggle.com/c/flower-classification-with-tpus/discussion/129820\">gotten it to work in Kaggle Notebooks</a> on the Flower Classification competition.</p>",
      "votes": 1,
      "replies": [
        {
          "id": 743335,
          "author_name": "Hieu Phung",
          "author_url": "",
          "post_date": "2020-02-12T01:56:19.633000",
          "content": "<p>Looks promising! Thanks for his work, we can successfully install PyTorch-XLA in a kernel; however, it's not being able to use for now. Maybe, we need some more configurations and/or official support from Kaggle.</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 744299,
          "author_name": "Martin Görner",
          "author_url": "",
          "post_date": "2020-02-12T17:54:01.227000",
          "content": "<p>No unfortunately they have not. PyTorch support for TPUs is not something we have on Kaggle yet.</p>",
          "votes": 1,
          "replies": []
        },
        {
          "id": 744682,
          "author_name": "Hieu Phung",
          "author_url": "",
          "post_date": "2020-02-13T03:12:24.117000",
          "content": "<p>Supporting in the near future, maybe?</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 742181,
      "author_name": "哈尔的移动城堡",
      "author_url": "",
      "post_date": "2020-02-11T06:07:39.147000",
      "content": "<p>I  remember   once  there  is a  news  that   we  can  use  Google's  TPU  with  pytorch .</p>\n\n<p><a href=\"https://github.com/pytorch/xla\">view  this  github  </a></p>",
      "votes": 1,
      "replies": [
        {
          "id": 742542,
          "author_name": "Hieu Phung",
          "author_url": "",
          "post_date": "2020-02-11T11:15:53.983000",
          "content": "<p>Sadly, it doesn't work in Kaggle's notebooks 😂, for now.</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 742551,
          "author_name": "哈尔的移动城堡",
          "author_url": "",
          "post_date": "2020-02-11T11:20:24.740000",
          "content": "<p>Oh,  that's  so  sad .</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 770144,
      "author_name": "Martin Görner",
      "author_url": "",
      "post_date": "2020-03-12T16:02:21.223000",
      "content": "<p>More info here: <a href=\"https://www.kaggle.com/c/flower-classification-with-tpus/discussion/133777\">https://www.kaggle.com/c/flower-classification-with-tpus/discussion/133777</a>\nI'll be posting updates there as work on PyTorch-XLA continues.</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 769565,
      "author_name": "",
      "author_url": "",
      "post_date": "2020-03-12T02:34:37.057000",
      "content": "<p>I got same question since GPU credits have been used up.</p>",
      "votes": 1,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "742083": "So this morning, according to my time-zone, Kaggle've added TPU accelerator option in everyone's notebooks and each kaggler has provided 30 hours/week quota for using it. I know the easiest and most effective way to take advantage of TPU is constructing and training models by using Tensorflow or Keras; however, can someone who still wants to stick to using PyTorch utilize the TPU's power?\n\nUPDATE: Thanks to @adityaecdrid, we are coming closer to being able to use TPU with PyTorch. For more detail, let read the instructions [here](https://www.kaggle.com/c/flower-classification-with-tpus/discussion/129820).",
    "743328": "Yes, it looks like others have [gotten it to work in Kaggle Notebooks](https://www.kaggle.com/c/flower-classification-with-tpus/discussion/129820) on the Flower Classification competition.",
    "742181": "I  remember   once  there  is a  news  that   we  can  use  Google's  TPU  with  pytorch .\n\n[view  this  github  ](https://github.com/pytorch/xla)",
    "770144": "More info here: https://www.kaggle.com/c/flower-classification-with-tpus/discussion/133777\nI'll be posting updates there as work on PyTorch-XLA continues.",
    "769565": "I got same question since GPU credits have been used up."
  }
}