{
  "id": 135507,
  "title": "ValueError: Please provide a TPU Name to connect to",
  "url": "/competitions/flower-classification-with-tpus/discussion/135507",
  "author_name": "JAISHREERAM",
  "post_date": "2020-03-14T08:39:56.655000",
  "votes": 0,
  "comment_count": 8,
  "views": 0,
  "content": "<p>** I   AM  Not able to use TPU Please Help!**</p>\n\n<p>AUTO = tf.data.experimental.AUTOTUNE</p>\n\n<h1>Create strategy from tpu</h1>\n\n<p>tpu = tf.distribute.cluster_resolver.TPUClusterResolver()</p>\n\n<p>tf.config.experimental_connect_to_cluster(tpu)</p>\n\n<p>tf.tpu.experimental.initialize_tpu_system(tpu)</p>\n\n<p>strategy = tf.distribute.experimental.TPUStrategy(tpu)</p>\n\n<h1>Data access</h1>\n\n<p>GCS_DS_PATH = KaggleDatasets().get_gcs_path()</p>\n\n<h1>Configuration</h1>\n\n<p>IMAGE_SIZE = [512, 512]\nEPOCHS = 20\nBATCH_SIZE = 16 * strategy.num_replicas_in_sync\nprint(GCS_DS_PATH)</p>\n\n<p>ValueError: Please provide a TPU Name to connect to.</p>\n\n<p>Please help!!</p>",
  "messages": [
    {
      "id": 772103,
      "postDate": "2020-03-15T02:33:53.583Z",
      "content": "<p>Once you have selected the TPU,  \"restart the session\". </p>\n\n<p>I have had this happen too and I just make sure I have the TPU selected and restart the session. Of course, you must have spare TPU quota. :)</p>",
      "rawMarkdown": "Once you have selected the TPU,  \"restart the session\". \n\nI have had this happen too and I just make sure I have the TPU selected and restart the session. Of course, you must have spare TPU quota. :)",
      "votes": 3,
      "replies": [
        {
          "id": 772108,
          "postDate": "2020-03-15T02:51:07.773Z",
          "content": "<p>Thank's @Bruce , Now my Tpu is working fine .\nMain reason of this error is ,I started two TPU Notebook at two tab, By closing one Tpu notebook it's work fine.\nthanks for quick response.</p>",
          "rawMarkdown": "Thank's @Bruce , Now my Tpu is working fine .\nMain reason of this error is ,I started two TPU Notebook at two tab, By closing one Tpu notebook it's work fine.\nthanks for quick response."
        },
        {
          "id": 2745294,
          "postDate": "2024-04-10T14:28:48.433Z",
          "content": "<p>thanks for the help. I'm starting here and I was facing the same problem.</p>",
          "rawMarkdown": "thanks for the help. I'm starting here and I was facing the same problem."
        }
      ]
    },
    {
      "id": 771550,
      "postDate": "2020-03-14T10:02:01.913Z",
      "content": "<p>Sounds like you haven't chosen the TPU Accelerator.  It's on the right side under Settings. </p>",
      "rawMarkdown": "Sounds like you haven't chosen the TPU Accelerator.  It's on the right side under Settings. ",
      "votes": 3
    },
    {
      "id": 772091,
      "postDate": "2020-03-15T02:04:15.787Z",
      "content": "<p>I also have this problem and have chosen the TPU Accelerator  TPUv3-8</p>",
      "rawMarkdown": "I also have this problem and have chosen the TPU Accelerator  TPUv3-8",
      "votes": 1
    },
    {
      "id": 805247,
      "postDate": "2020-04-12T13:58:20.310Z",
      "content": "<p>Just got this problem and solved.\nFor me, restarting session didn't help... I fixed it by switching to None and then switching back to TPU.</p>",
      "rawMarkdown": "Just got this problem and solved.\nFor me, restarting session didn't help... I fixed it by switching to None and then switching back to TPU.",
      "replies": [
        {
          "id": 806486,
          "postDate": "2020-04-13T19:15:20.563Z",
          "content": "<p>Thanks for reporting! </p>\n\n<p>Could you provide the steps that caused you to hit it initially? You had TPU switched on and it still didn't work until you switched to Note and back?</p>\n\n<p>We briefly had a bug where turning on TPU didn't actually turn it on until you restarted, but that was fixed a couple of weeks ago. Curious if you're still seeing something like that.</p>",
          "rawMarkdown": "Thanks for reporting! \n\nCould you provide the steps that caused you to hit it initially? You had TPU switched on and it still didn't work until you switched to Note and back?\n\nWe briefly had a bug where turning on TPU didn't actually turn it on until you restarted, but that was fixed a couple of weeks ago. Curious if you're still seeing something like that.",
          "votes": 1
        }
      ]
    },
    {
      "id": 771495,
      "postDate": "2020-03-14T08:39:56.657Z",
      "content": "<p>** I   AM  Not able to use TPU Please Help!**</p>\n\n<p>AUTO = tf.data.experimental.AUTOTUNE</p>\n\n<h1>Create strategy from tpu</h1>\n\n<p>tpu = tf.distribute.cluster_resolver.TPUClusterResolver()</p>\n\n<p>tf.config.experimental_connect_to_cluster(tpu)</p>\n\n<p>tf.tpu.experimental.initialize_tpu_system(tpu)</p>\n\n<p>strategy = tf.distribute.experimental.TPUStrategy(tpu)</p>\n\n<h1>Data access</h1>\n\n<p>GCS_DS_PATH = KaggleDatasets().get_gcs_path()</p>\n\n<h1>Configuration</h1>\n\n<p>IMAGE_SIZE = [512, 512]\nEPOCHS = 20\nBATCH_SIZE = 16 * strategy.num_replicas_in_sync\nprint(GCS_DS_PATH)</p>\n\n<p>ValueError: Please provide a TPU Name to connect to.</p>\n\n<p>Please help!!</p>",
      "rawMarkdown": "** I   AM  Not able to use TPU Please Help!**\n\nAUTO = tf.data.experimental.AUTOTUNE\n\n# Create strategy from tpu\ntpu = tf.distribute.cluster_resolver.TPUClusterResolver()\n\ntf.config.experimental_connect_to_cluster(tpu)\n\ntf.tpu.experimental.initialize_tpu_system(tpu)\n\nstrategy = tf.distribute.experimental.TPUStrategy(tpu)\n\n# Data access\nGCS_DS_PATH = KaggleDatasets().get_gcs_path()\n\n# Configuration\nIMAGE_SIZE = [512, 512]\nEPOCHS = 20\nBATCH_SIZE = 16 * strategy.num_replicas_in_sync\nprint(GCS_DS_PATH)\n\nValueError: Please provide a TPU Name to connect to.\n\nPlease help!!"
    },
    {
      "id": 2846154,
      "postDate": "2024-05-31T00:55:23.280Z",
      "rawMarkdown": "",
      "isDeleted": true
    }
  ],
  "comments": [
    {
      "id": 772103,
      "author_name": "Bruce Young",
      "author_url": "",
      "post_date": "2020-03-15T02:33:53.583000",
      "content": "<p>Once you have selected the TPU,  \"restart the session\". </p>\n\n<p>I have had this happen too and I just make sure I have the TPU selected and restart the session. Of course, you must have spare TPU quota. :)</p>",
      "votes": 3,
      "replies": [
        {
          "id": 772108,
          "author_name": "JAISHREERAM",
          "author_url": "",
          "post_date": "2020-03-15T02:51:07.773000",
          "content": "<p>Thank's @Bruce , Now my Tpu is working fine .\nMain reason of this error is ,I started two TPU Notebook at two tab, By closing one Tpu notebook it's work fine.\nthanks for quick response.</p>",
          "votes": 0,
          "replies": []
        },
        {
          "id": 2745294,
          "author_name": "Paulo Gaspar",
          "author_url": "",
          "post_date": "2024-04-10T14:28:48.433000",
          "content": "<p>thanks for the help. I'm starting here and I was facing the same problem.</p>",
          "votes": 0,
          "replies": []
        }
      ]
    },
    {
      "id": 771550,
      "author_name": "Bruce Young",
      "author_url": "",
      "post_date": "2020-03-14T10:02:01.913000",
      "content": "<p>Sounds like you haven't chosen the TPU Accelerator.  It's on the right side under Settings. </p>",
      "votes": 3,
      "replies": []
    },
    {
      "id": 772091,
      "author_name": "ilearning99",
      "author_url": "",
      "post_date": "2020-03-15T02:04:15.787000",
      "content": "<p>I also have this problem and have chosen the TPU Accelerator  TPUv3-8</p>",
      "votes": 1,
      "replies": []
    },
    {
      "id": 805247,
      "author_name": "Muffin",
      "author_url": "",
      "post_date": "2020-04-12T13:58:20.310000",
      "content": "<p>Just got this problem and solved.\nFor me, restarting session didn't help... I fixed it by switching to None and then switching back to TPU.</p>",
      "votes": 0,
      "replies": [
        {
          "id": 806486,
          "author_name": "Victor Mota",
          "author_url": "",
          "post_date": "2020-04-13T19:15:20.563000",
          "content": "<p>Thanks for reporting! </p>\n\n<p>Could you provide the steps that caused you to hit it initially? You had TPU switched on and it still didn't work until you switched to Note and back?</p>\n\n<p>We briefly had a bug where turning on TPU didn't actually turn it on until you restarted, but that was fixed a couple of weeks ago. Curious if you're still seeing something like that.</p>",
          "votes": 1,
          "replies": []
        }
      ]
    },
    {
      "id": 2846154,
      "author_name": "",
      "author_url": "",
      "post_date": "2024-05-31T00:55:23.280000",
      "content": "",
      "votes": 0,
      "replies": []
    }
  ],
  "raw_markdown_by_id": {
    "772103": "Once you have selected the TPU,  \"restart the session\". \n\nI have had this happen too and I just make sure I have the TPU selected and restart the session. Of course, you must have spare TPU quota. :)",
    "771550": "Sounds like you haven't chosen the TPU Accelerator.  It's on the right side under Settings. ",
    "772091": "I also have this problem and have chosen the TPU Accelerator  TPUv3-8",
    "805247": "Just got this problem and solved.\nFor me, restarting session didn't help... I fixed it by switching to None and then switching back to TPU.",
    "771495": "** I   AM  Not able to use TPU Please Help!**\n\nAUTO = tf.data.experimental.AUTOTUNE\n\n# Create strategy from tpu\ntpu = tf.distribute.cluster_resolver.TPUClusterResolver()\n\ntf.config.experimental_connect_to_cluster(tpu)\n\ntf.tpu.experimental.initialize_tpu_system(tpu)\n\nstrategy = tf.distribute.experimental.TPUStrategy(tpu)\n\n# Data access\nGCS_DS_PATH = KaggleDatasets().get_gcs_path()\n\n# Configuration\nIMAGE_SIZE = [512, 512]\nEPOCHS = 20\nBATCH_SIZE = 16 * strategy.num_replicas_in_sync\nprint(GCS_DS_PATH)\n\nValueError: Please provide a TPU Name to connect to.\n\nPlease help!!",
    "2846154": ""
  }
}