Add missing NumPy import, and clarify GCP account creation

main
Aurélien Geron 2022-04-15 22:48:36 +12:00
parent f6f90a46ba
commit ce5fa07d59
1 changed files with 5 additions and 3 deletions

View File

@ -534,6 +534,8 @@
}
],
"source": [
"import numpy as np\n",
"\n",
"y_proba = np.array(response[\"predictions\"])\n",
"y_proba.round(2)"
]
@ -845,7 +847,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"Follow the instructions in the book to deploy the model to Google Cloud Vertex AI and to create the model endpoint. Then, if you're running this notebook in Colab, you can run the following cell to authenticate using the same Google account as you used with Google Cloud Platform, and authorize this Colab to access your data.\n",
"Follow the instructions in the book to create a Google Cloud Platform account and activate the Vertex AI and Cloud Storage APIs. Then, if you're running this notebook in Colab, you can run the following cell to authenticate using the same Google account as you used with Google Cloud Platform, and authorize this Colab to access your data.\n",
"\n",
"**WARNING: only do this if you trust this notebook!**\n",
"* Be extra careful if this is not the official notebook from https://github.com/ageron/handson-ml3: the Colab URL should start with https://colab.research.google.com/github/ageron/handson-ml3. Or else, the code could do whatever it wants with your data.\n",
@ -859,7 +861,7 @@
"metadata": {},
"outputs": [],
"source": [
"project_id = \"my_project\" # change this to your project ID\n",
"project_id = \"my_project\" ##### CHANGE THIS TO YOUR PROJECT ID #####\n",
"\n",
"if \"google.colab\" in sys.modules:\n",
" from google.colab import auth\n",
@ -879,7 +881,7 @@
"source": [
"from google.cloud import storage\n",
"\n",
"bucket_name = \"my_bucket\" # change this to a unique bucket name\n",
"bucket_name = \"my_bucket\" ##### CHANGE THIS TO A UNIQUE BUCKET NAME #####\n",
"location = \"us-central1\"\n",
"\n",
"storage_client = storage.Client(project=project_id)\n",