You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"In this example we will use [run_models](https://github.com/tensorflow/cloud/blob/690c3eee65dadee8af260a19341ff23f42f1f070/src/python/tensorflow_cloud/core/experimental/models.py#L30) from the experimental module of TF Cloud to train a ResNet model from [TF Model Garden](https://github.com/tensorflow/models/tree/master/official) on [imagenette from TFDS](https://www.tensorflow.org/datasets/catalog/imagenette)."
85
+
]
86
+
},
87
+
{
88
+
"cell_type": "markdown",
89
+
"metadata": {
90
+
"id": "EFCSAVDbC8-W"
91
+
},
92
+
"source": [
93
+
"## Install Packages\n",
94
+
"\n",
95
+
"We need the nightly version of tensorflow-cloud that we can get from github, the official release of tf-models-official, and keras 2.6.0rc0 for compatibility."
"Setting project parameters. For more details on Google Cloud Specific parameters please refer to [Google Cloud Project Setup Instructions](https://www.kaggle.com/nitric/google-cloud-project-setup-instructions/)."
155
+
]
156
+
},
157
+
{
158
+
"cell_type": "code",
159
+
"metadata": {
160
+
"id": "OFPPSLF9vx4H"
161
+
},
162
+
"source": [
163
+
"# Set Google Cloud Specific parameters\n",
164
+
"\n",
165
+
"# TODO: Please set GCP_PROJECT_ID to your own Google Cloud project ID.\n",
"## Authenticating the notebook to use your Google Cloud Project\n",
187
+
"\n",
188
+
"This code authenticates the notebook, checking your valid Google Cloud credentials and identity. It is inside the `if not tfc.remote()` block to ensure that it is only run in the notebook, and will not be run when the notebook code is sent to Google Cloud.\n",
189
+
"\n",
190
+
"Note: For Kaggle Notebooks click on \"Add-ons\"->\"Google Cloud SDK\" before running the cell below."
191
+
]
192
+
},
193
+
{
194
+
"cell_type": "code",
195
+
"metadata": {
196
+
"id": "EeW7IHBgtPJD"
197
+
},
198
+
"source": [
199
+
"if not tfc.remote():\n",
200
+
"\n",
201
+
" # Authentication for Kaggle Notebooks\n",
202
+
" if \"kaggle_secrets\" in sys.modules:\n",
203
+
" from kaggle_secrets import UserSecretsClient\n",
"Set up parameters for tfc.run(). The chief_config, worker_count and worker_config will be set up individually for each distribution strategy. For more details refer to [TensorFlow Cloud overview tutorial](https://colab.research.google.com/github/tensorflow/cloud/blob/master/g3doc/tutorials/overview.ipynb)"
"Most remote training jobs are long running. If you are using Colab, it may time out before the training results are available.\n",
288
+
"\n",
289
+
"In that case, **rerun the following sections in order** to reconnect and configure your Colab instance to access the training results.\n",
290
+
"\n",
291
+
"1. Import required modules\n",
292
+
"2. Project Configurations\n",
293
+
"3. Authenticating the notebook to use your Google Cloud Project\n",
294
+
"\n",
295
+
"**DO NOT** rerun the rest of the code.\n",
296
+
"\n",
297
+
"### Load Tensorboard\n",
298
+
"While the training is in progress you can use Tensorboard to view the results. Note the results will show only after your training has started. This may take a few minutes."
0 commit comments