{
  "id": 124914,
  "title": "My python script for training on GCP + TPU",
  "url": "/competitions/tensorflow2-question-answering/discussion/124914",
  "author_name": "",
  "post_date": "2020-01-07T13:18:48.629304800Z",
  "votes": 5,
  "comment_count": 7,
  "views": 0,
  "content": "<p>I just made my training on GCP + TPU working and I just published my python script.</p>\n\n<p><a href=\"https://www.kaggle.com/yihdarshieh/tf2-training-on-gcp-tpu?scriptVersionId=26464952\">https://www.kaggle.com/yihdarshieh/tf2-training-on-gcp-tpu?scriptVersionId=26464952</a></p>\n\n<p>Good luck.</p>",
  "messages": [
    {
      "id": "712636",
      "postDate": "01/07/2020 13:18:48",
      "content": "<p>I just made my training on GCP + TPU working and I just published my python script.</p>\n\n<p><a href=\"https://www.kaggle.com/yihdarshieh/tf2-training-on-gcp-tpu?scriptVersionId=26464952\">https://www.kaggle.com/yihdarshieh/tf2-training-on-gcp-tpu?scriptVersionId=26464952</a></p>\n\n<p>Good luck.</p>",
      "rawMarkdown": "I just made my training on GCP + TPU working and I just published my python script.\n\n[https://www.kaggle.com/yihdarshieh/tf2-training-on-gcp-tpu?scriptVersionId=26464952](https://www.kaggle.com/yihdarshieh/tf2-training-on-gcp-tpu?scriptVersionId=26464952)\n\nGood luck.",
      "votes": null
    },
    {
      "id": "712648",
      "postDate": "01/07/2020 13:27:05",
      "content": "<p><a href=\"/yihdarshieh\">@yihdarshieh</a> once again great work. Your work has helped many people but you should let somethings to be figured out on their own. That's how people will learn :)</p>",
      "rawMarkdown": "yihdarshieh once again great work. Your work has helped many people but you should let somethings to be figured out on their own. That's how people will learn :)",
      "votes": null
    },
    {
      "id": "712658",
      "postDate": "01/07/2020 13:37:18",
      "content": "<p>I am too lazy to figure out what should be left out for other people to figure out their own ... :) </p>",
      "rawMarkdown": "I am too lazy to figure out what should be left out for other people to figure out their own ... :)",
      "votes": null
    },
    {
      "id": "712660",
      "postDate": "01/07/2020 13:39:08",
      "content": "<p>Nice XD</p>",
      "rawMarkdown": "Nice XD",
      "votes": null
    },
    {
      "id": "712663",
      "postDate": "01/07/2020 13:42:56",
      "content": "<p>Be careful - you have to figure out what's the model name to use the bert large already fine tuned with SQuAd ....\nIn the published script, I used distilled bert!</p>",
      "rawMarkdown": "Be careful - you have to figure out what's the model name to use the bert large already fine tuned with SQuAd ....\nIn the published script, I used distilled bert!",
      "votes": null
    },
    {
      "id": "713067",
      "postDate": "01/07/2020 21:09:42",
      "content": "<p>Although the TF record file and checkpoints dir should be on Google Storage bucket, some <code>nq-competition</code> files are still necessary to kept on GCP VM local file system.</p>",
      "rawMarkdown": "Although the TF record file and checkpoints dir should be on Google Storage bucket, some `nq-competition` files are still necessary to kept on GCP VM local file system.",
      "votes": null
    },
    {
      "id": "713975",
      "postDate": "01/08/2020 21:42:15",
      "content": "<p>Thanks for sharing. One little simplification: TPUClusterResolver() works fine without parameters provided an env var named <code>TPU_NAME</code> is defined on the VM. What I usually do on GCP is I create my VM and my TPU with the same name and set <code>TPU_NAME</code> on the VM with the name. This can even be done with a startup script so that the env variable persists across reboots: <code>--metadata startup-script=\"echo \\\"export TPU_NAME=$1\\\" &amp;gt; /etc/profile.d/tpu-env.sh\"</code>. VM+TPU creation script here: <a href=\"https://github.com/GoogleCloudPlatform/training-data-analyst/blob/master/courses/fast-and-lean-data-science/create-tpu-deep-learning-vm.sh\">https://github.com/GoogleCloudPlatform/training-data-analyst/blob/master/courses/fast-and-lean-data-science/create-tpu-deep-learning-vm.sh</a></p>",
      "rawMarkdown": "Thanks for sharing. One little simplification: TPUClusterResolver() works fine without parameters provided an env var named `TPU_NAME` is defined on the VM. What I usually do on GCP is I create my VM and my TPU with the same name and set `TPU_NAME` on the VM with the name. This can even be done with a startup script so that the env variable persists across reboots: `--metadata startup-script=\"echo \\\"export TPU_NAME=$1\\\" &gt; /etc/profile.d/tpu-env.sh\"`. VM+TPU creation script here: https://github.com/GoogleCloudPlatform/training-data-analyst/blob/master/courses/fast-and-lean-data-science/create-tpu-deep-learning-vm.sh",
      "votes": null
    },
    {
      "id": "713981",
      "postDate": "01/08/2020 22:08:12",
      "content": "<p>Thanks for the info!</p>",
      "rawMarkdown": "Thanks for the info!",
      "votes": null
    }
  ],
  "comments": [
    {
      "id": 712648,
      "author_name": "axel81",
      "author_url": "",
      "post_date": "01/07/2020 13:27:05",
      "content": "<p><a href=\"/yihdarshieh\">@yihdarshieh</a> once again great work. Your work has helped many people but you should let somethings to be figured out on their own. That's how people will learn :)</p>",
      "votes": null,
      "replies": [
        {
          "id": 712658,
          "author_name": "yihdarshieh",
          "author_url": "",
          "post_date": "01/07/2020 13:37:18",
          "content": "<p>I am too lazy to figure out what should be left out for other people to figure out their own ... :) </p>",
          "votes": null,
          "replies": []
        },
        {
          "id": 712660,
          "author_name": "axel81",
          "author_url": "",
          "post_date": "01/07/2020 13:39:08",
          "content": "<p>Nice XD</p>",
          "votes": null,
          "replies": []
        }
      ]
    },
    {
      "id": 712663,
      "author_name": "yihdarshieh",
      "author_url": "",
      "post_date": "01/07/2020 13:42:56",
      "content": "<p>Be careful - you have to figure out what's the model name to use the bert large already fine tuned with SQuAd ....\nIn the published script, I used distilled bert!</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 713067,
      "author_name": "yihdarshieh",
      "author_url": "",
      "post_date": "01/07/2020 21:09:42",
      "content": "<p>Although the TF record file and checkpoints dir should be on Google Storage bucket, some <code>nq-competition</code> files are still necessary to kept on GCP VM local file system.</p>",
      "votes": null,
      "replies": []
    },
    {
      "id": 713975,
      "author_name": "martingorner",
      "author_url": "",
      "post_date": "01/08/2020 21:42:15",
      "content": "<p>Thanks for sharing. One little simplification: TPUClusterResolver() works fine without parameters provided an env var named <code>TPU_NAME</code> is defined on the VM. What I usually do on GCP is I create my VM and my TPU with the same name and set <code>TPU_NAME</code> on the VM with the name. This can even be done with a startup script so that the env variable persists across reboots: <code>--metadata startup-script=\"echo \\\"export TPU_NAME=$1\\\" &amp;gt; /etc/profile.d/tpu-env.sh\"</code>. VM+TPU creation script here: <a href=\"https://github.com/GoogleCloudPlatform/training-data-analyst/blob/master/courses/fast-and-lean-data-science/create-tpu-deep-learning-vm.sh\">https://github.com/GoogleCloudPlatform/training-data-analyst/blob/master/courses/fast-and-lean-data-science/create-tpu-deep-learning-vm.sh</a></p>",
      "votes": null,
      "replies": [
        {
          "id": 713981,
          "author_name": "yihdarshieh",
          "author_url": "",
          "post_date": "01/08/2020 22:08:12",
          "content": "<p>Thanks for the info!</p>",
          "votes": null,
          "replies": []
        }
      ]
    }
  ],
  "raw_markdown_by_id": {
    "712636": "I just made my training on GCP + TPU working and I just published my python script.\n\n[https://www.kaggle.com/yihdarshieh/tf2-training-on-gcp-tpu?scriptVersionId=26464952](https://www.kaggle.com/yihdarshieh/tf2-training-on-gcp-tpu?scriptVersionId=26464952)\n\nGood luck.",
    "712648": "yihdarshieh once again great work. Your work has helped many people but you should let somethings to be figured out on their own. That's how people will learn :)",
    "712658": "I am too lazy to figure out what should be left out for other people to figure out their own ... :)",
    "712660": "Nice XD",
    "712663": "Be careful - you have to figure out what's the model name to use the bert large already fine tuned with SQuAd ....\nIn the published script, I used distilled bert!",
    "713067": "Although the TF record file and checkpoints dir should be on Google Storage bucket, some `nq-competition` files are still necessary to kept on GCP VM local file system.",
    "713975": "Thanks for sharing. One little simplification: TPUClusterResolver() works fine without parameters provided an env var named `TPU_NAME` is defined on the VM. What I usually do on GCP is I create my VM and my TPU with the same name and set `TPU_NAME` on the VM with the name. This can even be done with a startup script so that the env variable persists across reboots: `--metadata startup-script=\"echo \\\"export TPU_NAME=$1\\\" &gt; /etc/profile.d/tpu-env.sh\"`. VM+TPU creation script here: https://github.com/GoogleCloudPlatform/training-data-analyst/blob/master/courses/fast-and-lean-data-science/create-tpu-deep-learning-vm.sh",
    "713981": "Thanks for the info!"
  },
  "source": "meta"
}