Skip to content

Commit 00ed5ca

Browse files
MarkDaoustTensorflow Cloud maintainers
authored andcommitted
Notebook cleanup for tensorflow_cloud
PiperOrigin-RevId: 374672565
1 parent f7336cb commit 00ed5ca

6 files changed

+122
-31
lines changed

g3doc/METADATA

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,19 @@ presubmit: {
1717
# Standard docs checks for tensorflow.org and friends.
1818
include_presubmit: "//depot/google3/third_party/py/tensorflow_docs/google/tensorflow.org.METADATA"
1919
}
20+
21+
presubmit: {
22+
# Generally we save notebooks without output to avoid repo bloat.
23+
# and make reviews easier. THen we execute notebooks to test them
24+
# when building the site... That's not possible in this case. So these
25+
# notebooks require at least one output cell.
26+
path_expression: "....ipynb"
27+
28+
check_contents: {
29+
failure_message:
30+
"TensorFlow cloud notebooks are not runnable in the tensorflow.org import"
31+
"pipeline. so these notebooks must be saved with at least one"
32+
"cell output, typically the `print(tfc.__version__)`"
33+
required_regexp: "\"output_type\":"
34+
}
35+
}

g3doc/tutorials/distributed_training_nasnet_with_tensorflow_cloud.ipynb

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@
3939
"source": [
4040
"# Distributed training NasNet with tensorflow_cloud and Google Cloud\n",
4141
"\n",
42-
"This example is based on [Image classification via fine-tuning with EfficientNet](https://keras.io/examples/vision/image_classification_efficientnet_fine_tuning/) to demonstrate how to train a [NasNetMobile](https://keras.io/api/applications/nasnet/#nasnetmobile-function) model using [tensorflow_cloud](https://tensorflow.org/cloud) and Google Cloud Platform at scale using distributed training.\n",
43-
"\n",
4442
"\u003ctable class=\"tfo-notebook-buttons\" align=\"left\"\u003e\n",
4543
" \u003ctd\u003e\n",
4644
" \u003ca target=\"_blank\" href=\"https://www.tensorflow.org/cloud/tutorials/distributed_training_nasnet_with_tensorflow_cloud.ipynb\"\u003e\u003cimg src=\"https://www.tensorflow.org/images/tf_logo_32px.png\" /\u003eView on TensorFlow.org\u003c/a\u003e\n",
@@ -55,13 +53,22 @@
5553
" \u003ca href=\"https://storage.googleapis.com/tensorflow_docs/cloud/tutorials/distributed_training_nasnet_with_tensorflow_cloud.ipynb\"\u003e\u003cimg src=\"https://www.tensorflow.org/images/download_logo_32px.png\" /\u003eDownload notebook\u003c/a\u003e\n",
5654
" \u003c/td\u003e\n",
5755
" \u003ctd\u003e\n",
58-
" \u003ca href=\"https://kaggle.com/kernels/welcome?src=https://github.com/tensorflow/cloud/blob/master/g3doc/tutorials/distributed_training_nasnet_with_tensorflow_cloud.ipynb\"\u003e\n",
56+
" \u003ca href=\"https://kaggle.com/kernels/welcome?src=https://github.com/tensorflow/cloud/blob/master/g3doc/tutorials/distributed_training_nasnet_with_tensorflow_cloud.ipynb\" target=\"blank\"\u003e\n",
5957
" \u003cimg width=\"90\" src=\"https://www.kaggle.com/static/images/site-logo.png\" alt=\"Kaggle logo\"\u003eRun in Kaggle\n",
6058
" \u003c/a\u003e\n",
6159
" \u003c/td\u003e\n",
6260
"\u003c/table\u003e\n"
6361
]
6462
},
63+
{
64+
"cell_type": "markdown",
65+
"metadata": {
66+
"id": "U0rZvc_B8Ilk"
67+
},
68+
"source": [
69+
"This example is based on [Image classification via fine-tuning with EfficientNet](https://keras.io/examples/vision/image_classification_efficientnet_fine_tuning/) to demonstrate how to train a [NasNetMobile](https://keras.io/api/applications/nasnet/#nasnetmobile-function) model using [tensorflow_cloud](https://tensorflow.org/cloud) and Google Cloud Platform at scale using distributed training."
70+
]
71+
},
6572
{
6673
"cell_type": "markdown",
6774
"metadata": {
@@ -105,7 +112,15 @@
105112
"metadata": {
106113
"id": "kA1D8jB3TviQ"
107114
},
108-
"outputs": [],
115+
"outputs": [
116+
{
117+
"name": "stdout",
118+
"output_type": "stream",
119+
"text": [
120+
"0.1.15\n"
121+
]
122+
}
123+
],
109124
"source": [
110125
"! pip install -q tensorflow-cloud\n",
111126
"\n",

g3doc/tutorials/google_cloud_project_setup_instructions.ipynb

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,6 @@
3939
"source": [
4040
"# Setting Up and Connecting To Your Google Cloud Account\n",
4141
"\n",
42-
"This guide is to help first time users set up a Google Cloud Platform account specifically with the intention to use [tensorflow_cloud](https://tensorflow.org/cloud) to easily run training at scale on Google Cloud AI Platform. [TensorFlow Cloud](https://tensorflow.org/cloud) provides APIs that allow users to easily go from debugging, training, tuning Keras and TensorFlow code in a local or kaggle environment to distributed training/tuning on Cloud.\n",
43-
"\n",
44-
"\n",
4542
"\u003ctable class=\"tfo-notebook-buttons\" align=\"left\"\u003e\n",
4643
" \u003ctd\u003e\n",
4744
" \u003ca target=\"_blank\" href=\"https://www.tensorflow.org/cloud/tutorials/google_cloud_project_setup_instructions.ipynb\"\u003e\u003cimg src=\"https://www.tensorflow.org/images/tf_logo_32px.png\" /\u003eView on TensorFlow.org\u003c/a\u003e\n",
@@ -56,13 +53,22 @@
5653
" \u003ca href=\"https://storage.googleapis.com/tensorflow_docs/cloud/tutorials/google_cloud_project_setup_instructions.ipynb\"\u003e\u003cimg src=\"https://www.tensorflow.org/images/download_logo_32px.png\" /\u003eDownload notebook\u003c/a\u003e\n",
5754
" \u003c/td\u003e\n",
5855
" \u003ctd\u003e\n",
59-
" \u003ca href=\"https://kaggle.com/kernels/welcome?src=https://github.com/tensorflow/cloud/blob/master/g3doc/tutorials/google_cloud_project_setup_instructions.ipynb\"\u003e\n",
56+
" \u003ca href=\"https://kaggle.com/kernels/welcome?src=https://github.com/tensorflow/cloud/blob/master/g3doc/tutorials/google_cloud_project_setup_instructions.ipynb\" target=\"blank\"\u003e\n",
6057
" \u003cimg width=\"90\" src=\"https://www.kaggle.com/static/images/site-logo.png\" alt=\"Kaggle logo\"\u003eRun in Kaggle\n",
6158
" \u003c/a\u003e\n",
6259
" \u003c/td\u003e\n",
6360
"\u003c/table\u003e\n"
6461
]
6562
},
63+
{
64+
"cell_type": "markdown",
65+
"metadata": {
66+
"id": "vXUkgQhef4Op"
67+
},
68+
"source": [
69+
"This guide is to help first time users set up a Google Cloud Platform account specifically with the intention to use [tensorflow_cloud](https://tensorflow.org/cloud) to easily run training at scale on Google Cloud AI Platform. [TensorFlow Cloud](https://tensorflow.org/cloud) provides APIs that allow users to easily go from debugging, training, tuning Keras and TensorFlow code in a local or kaggle environment to distributed training/tuning on Cloud."
70+
]
71+
},
6672
{
6773
"cell_type": "markdown",
6874
"metadata": {
@@ -321,11 +327,21 @@
321327
"metadata": {
322328
"id": "yE1gpL8oUdV8"
323329
},
324-
"outputs": [],
330+
"outputs": [
331+
{
332+
"name": "stdout",
333+
"output_type": "stream",
334+
"text": [
335+
"Your GCP_PROJECT_ID is: YOUR_PROJECT_ID\n",
336+
"Your SERVICE_ACCOUNT_NAME is: YOUR_SERVICE_ACCOUNT_NAME\n",
337+
"Your BUCKET_NAME is: YOUR_BUCKET_NAME\n"
338+
]
339+
}
340+
],
325341
"source": [
326-
"print(f\"Your GCP_PROJECT_ID is: {GCP_PROJECT_ID}\")\n",
342+
"print(f\"Your GCP_PROJECT_ID is: {GCP_PROJECT_ID}\")\n",
327343
"print(f\"Your SERVICE_ACCOUNT_NAME is: {SERVICE_ACCOUNT_NAME}\")\n",
328-
"print(f\"Your BUCKET_NAME is: {BUCKET_NAME}\")"
344+
"print(f\"Your BUCKET_NAME is: {BUCKET_NAME}\")"
329345
]
330346
}
331347
],

g3doc/tutorials/hp_tuning_cifar10_using_google_cloud.ipynb

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,7 @@
3737
"id": "ztj7SjzXyu0p"
3838
},
3939
"source": [
40-
"# HP Tuning CIFAR10 on Google Cloud with tensorflow_cloud and CloudTuner\n",
41-
"\n",
42-
"This example is based on [Keras-Tuner CIFAR10 sample](https://github.com/keras-team/keras-tuner/blob/master/examples/cifar10.py) to demonstrate how to run HP tuning jobs using\n",
43-
"[TensorFlow Cloud](https://tensorflow.org/cloud) and Google Cloud Platform at scale.\n",
40+
"# HP Tuning on Google Cloud with CloudTuner\n",
4441
"\n",
4542
"\u003ctable class=\"tfo-notebook-buttons\" align=\"left\"\u003e\n",
4643
" \u003ctd\u003e\n",
@@ -56,13 +53,23 @@
5653
" \u003ca href=\"https://storage.googleapis.com/tensorflow_docs/cloud/tutorials/hp_tuning_cifar10_using_google_cloud.ipynb\"\u003e\u003cimg src=\"https://www.tensorflow.org/images/download_logo_32px.png\" /\u003eDownload notebook\u003c/a\u003e\n",
5754
" \u003c/td\u003e\n",
5855
" \u003ctd\u003e\n",
59-
" \u003ca href=\"https://kaggle.com/kernels/welcome?src=https://github.com/tensorflow/cloud/blob/master/g3doc/tutorials/hp_tuning_cifar10_using_google_cloud.ipynb\"\u003e\n",
56+
" \u003ca href=\"https://kaggle.com/kernels/welcome?src=https://github.com/tensorflow/cloud/blob/master/g3doc/tutorials/hp_tuning_cifar10_using_google_cloud.ipynb\" target=\"blank\"\u003e\n",
6057
" \u003cimg width=\"90\" src=\"https://www.kaggle.com/static/images/site-logo.png\" alt=\"Kaggle logo\"\u003eRun in Kaggle\n",
6158
" \u003c/a\u003e\n",
6259
" \u003c/td\u003e\n",
6360
"\u003c/table\u003e\n"
6461
]
6562
},
63+
{
64+
"cell_type": "markdown",
65+
"metadata": {
66+
"id": "8g27bt9Ug4aQ"
67+
},
68+
"source": [
69+
"This example is based on [Keras-Tuner CIFAR10 sample](https://github.com/keras-team/keras-tuner/blob/master/examples/cifar10.py) to demonstrate how to run HP tuning jobs using\n",
70+
"[TensorFlow Cloud](https://tensorflow.org/cloud) and Google Cloud Platform at scale.\n"
71+
]
72+
},
6673
{
6774
"cell_type": "markdown",
6875
"metadata": {
@@ -78,7 +85,15 @@
7885
"metadata": {
7986
"id": "a751fAMsyu0q"
8087
},
81-
"outputs": [],
88+
"outputs": [
89+
{
90+
"name": "stdout",
91+
"output_type": "stream",
92+
"text": [
93+
"0.1.15\n"
94+
]
95+
}
96+
],
8297
"source": [
8398
"import datetime\n",
8499
"import uuid\n",

g3doc/tutorials/hp_tuning_wide_and_deep_model.ipynb

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,6 @@
3939
"source": [
4040
"# Tuning a wide and deep model using Google Cloud\n",
4141
"\n",
42-
"In this example we will use CloudTuner and Google Cloud to Tune a [Wide and Deep Model](https://ai.googleblog.com/2016/06/wide-deep-learning-better-together-with.html) based on the tunable model introduced in [structured data learning with Wide, Deep, and Cross networks](https://keras.io/examples/structured_data/wide_deep_cross_networks/). In this example we will use the data set from [CAIIS Dogfood Day](https://www.kaggle.com/c/caiis-dogfood-day-2020/overview)\n",
43-
"\n",
44-
"\n",
4542
"\u003ctable class=\"tfo-notebook-buttons\" align=\"left\"\u003e\n",
4643
" \u003ctd\u003e\n",
4744
" \u003ca target=\"_blank\" href=\"https://www.tensorflow.org/cloud/tutorials/hp_tuning_wide_and_deep_model.ipynb\"\u003e\u003cimg src=\"https://www.tensorflow.org/images/tf_logo_32px.png\" /\u003eView on TensorFlow.org\u003c/a\u003e\n",
@@ -56,13 +53,23 @@
5653
" \u003ca href=\"https://storage.googleapis.com/tensorflow_docs/cloud/tutorials/hp_tuning_wide_and_deep_model.ipynb\"\u003e\u003cimg src=\"https://www.tensorflow.org/images/download_logo_32px.png\" /\u003eDownload notebook\u003c/a\u003e\n",
5754
" \u003c/td\u003e\n",
5855
" \u003ctd\u003e\n",
59-
" \u003ca href=\"https://kaggle.com/kernels/welcome?src=https://github.com/tensorflow/cloud/blob/master/g3doc/tutorials/hp_tuning_wide_and_deep_model.ipynb\"\u003e\n",
56+
" \u003ca href=\"https://kaggle.com/kernels/welcome?src=https://github.com/tensorflow/cloud/blob/master/g3doc/tutorials/hp_tuning_wide_and_deep_model.ipynb\" target=\"blank\"\u003e\n",
6057
" \u003cimg width=\"90\" src=\"https://www.kaggle.com/static/images/site-logo.png\" alt=\"Kaggle logo\"\u003eRun in Kaggle\n",
6158
" \u003c/a\u003e\n",
6259
" \u003c/td\u003e\n",
6360
"\u003c/table\u003e\n"
6461
]
6562
},
63+
{
64+
"cell_type": "markdown",
65+
"metadata": {
66+
"id": "Er9btVIUkjEq"
67+
},
68+
"source": [
69+
"\n",
70+
"In this example we will use CloudTuner and Google Cloud to Tune a [Wide and Deep Model](https://ai.googleblog.com/2016/06/wide-deep-learning-better-together-with.html) based on the tunable model introduced in [structured data learning with Wide, Deep, and Cross networks](https://keras.io/examples/structured_data/wide_deep_cross_networks/). In this example we will use the data set from [CAIIS Dogfood Day](https://www.kaggle.com/c/caiis-dogfood-day-2020/overview)"
71+
]
72+
},
6673
{
6774
"cell_type": "markdown",
6875
"metadata": {
@@ -76,9 +83,18 @@
7683
"cell_type": "code",
7784
"execution_count": null,
7885
"metadata": {
79-
"id": "dzyeZrh9C99v"
86+
"id": "dzyeZrh9C99v",
87+
"outputId": "353637ca-a7d4-4d49-c030-dcbb103355bb"
8088
},
81-
"outputs": [],
89+
"outputs": [
90+
{
91+
"name": "stdout",
92+
"output_type": "stream",
93+
"text": [
94+
"0.1.15\n"
95+
]
96+
}
97+
],
8298
"source": [
8399
"import datetime\n",
84100
"import uuid\n",
@@ -609,10 +625,9 @@
609625
],
610626
"metadata": {
611627
"colab": {
612-
"collapsed_sections": [
613-
"aaHrkvhUm7hD"
614-
],
628+
"collapsed_sections": [],
615629
"name": "hp_tuning_wide_and_deep_model.ipynb",
630+
"provenance": [],
616631
"toc_visible": true
617632
},
618633
"kernelspec": {

g3doc/tutorials/overview.ipynb

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,6 @@
3939
"source": [
4040
"# TensorFlow Cloud\n",
4141
"\n",
42-
"TensorFlow Cloud is a library that makes it easier to do training and hyperparameter tuning of Keras models on Google Cloud.\n",
43-
"\n",
44-
"\n",
4542
"\u003ctable class=\"tfo-notebook-buttons\" align=\"left\"\u003e\n",
4643
" \u003ctd\u003e\n",
4744
" \u003ca target=\"_blank\" href=\"https://www.tensorflow.org/cloud/tutorials/overview.ipynb\"\u003e\u003cimg src=\"https://www.tensorflow.org/images/tf_logo_32px.png\" /\u003eView on TensorFlow.org\u003c/a\u003e\n",
@@ -56,13 +53,22 @@
5653
" \u003ca href=\"https://storage.googleapis.com/tensorflow_docs/cloud/tutorials/overview.ipynb\"\u003e\u003cimg src=\"https://www.tensorflow.org/images/download_logo_32px.png\" /\u003eDownload notebook\u003c/a\u003e\n",
5754
" \u003c/td\u003e\n",
5855
" \u003ctd\u003e\n",
59-
" \u003ca href=\"https://kaggle.com/kernels/welcome?src=https://github.com/tensorflow/cloud/blob/master/g3doc/tutorials/overview.ipynb\"\u003e\n",
56+
" \u003ca href=\"https://kaggle.com/kernels/welcome?src=https://github.com/tensorflow/cloud/blob/master/g3doc/tutorials/overview.ipynb\" target=\"blank\"\u003e\n",
6057
" \u003cimg width=\"90\" src=\"https://www.kaggle.com/static/images/site-logo.png\" alt=\"Kaggle logo\"\u003eRun in Kaggle\n",
6158
" \u003c/a\u003e\n",
6259
" \u003c/td\u003e\n",
6360
"\u003c/table\u003e\n"
6461
]
6562
},
63+
{
64+
"cell_type": "markdown",
65+
"metadata": {
66+
"id": "mU84TfyShbqm"
67+
},
68+
"source": [
69+
"TensorFlow Cloud is a library that makes it easier to do training and hyperparameter tuning of Keras models on Google Cloud.\n"
70+
]
71+
},
6672
{
6773
"cell_type": "markdown",
6874
"metadata": {
@@ -130,7 +136,15 @@
130136
"metadata": {
131137
"id": "kA1D8jB3TviQ"
132138
},
133-
"outputs": [],
139+
"outputs": [
140+
{
141+
"name": "stdout",
142+
"output_type": "stream",
143+
"text": [
144+
"0.1.15\n"
145+
]
146+
}
147+
],
134148
"source": [
135149
"! pip install -q tensorflow-cloud\n",
136150
"import tensorflow_cloud as tfc\n",

0 commit comments

Comments
 (0)