Skip to content

Commit 2340276

Browse files
authored
Merge pull request #1 from nidhinpd-YML/gsp-634-bugfix-package
aiplatform package installation, kernel restart code added
2 parents 95c58d0 + 658d3eb commit 2340276

1 file changed

Lines changed: 46 additions & 3 deletions

File tree

self-paced-labs/learning-tensorflow/convolutions-with-complex-images/CLS_Vertex_AI_CNN_horse_or_human.ipynb

Lines changed: 46 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,49 @@
106106
"## Setting up the environment"
107107
]
108108
},
109+
{
110+
"cell_type": "markdown",
111+
"metadata": {},
112+
"source": [
113+
"### Installation"
114+
]
115+
},
116+
{
117+
"cell_type": "code",
118+
"execution_count": null,
119+
"metadata": {},
120+
"outputs": [],
121+
"source": [
122+
"pip install google-cloud-aiplatform"
123+
]
124+
},
125+
{
126+
"cell_type": "markdown",
127+
"metadata": {
128+
"tags": []
129+
},
130+
"source": [
131+
"### Restart the kernel\n",
132+
"\n",
133+
"Once you've installed everything, you need to restart the notebook kernel so it can find the packages."
134+
]
135+
},
136+
{
137+
"cell_type": "code",
138+
"execution_count": null,
139+
"metadata": {},
140+
"outputs": [],
141+
"source": [
142+
"import os\n",
143+
"\n",
144+
"if not os.getenv(\"IS_TESTING\"):\n",
145+
" # Automatically restart kernel after installs\n",
146+
" import IPython\n",
147+
"\n",
148+
" app = IPython.Application.instance()\n",
149+
" app.kernel.do_shutdown(True)"
150+
]
151+
},
109152
{
110153
"cell_type": "markdown",
111154
"metadata": {
@@ -1372,12 +1415,12 @@
13721415
},
13731416
"environment": {
13741417
"kernel": "python3",
1375-
"name": "tf2-gpu.2-8.m99",
1418+
"name": "tf2-gpu.2-8.m102",
13761419
"type": "gcloud",
1377-
"uri": "gcr.io/deeplearning-platform-release/tf2-gpu.2-8:m99"
1420+
"uri": "gcr.io/deeplearning-platform-release/tf2-gpu.2-8:m102"
13781421
},
13791422
"kernelspec": {
1380-
"display_name": "Python 3",
1423+
"display_name": "Python 3 (ipykernel)",
13811424
"language": "python",
13821425
"name": "python3"
13831426
},

0 commit comments

Comments
 (0)