Skip to content

Commit

Permalink
Updated the prediction request section
Browse files Browse the repository at this point in the history
  • Loading branch information
UBhavani committed Jul 4, 2024
1 parent defc836 commit f130e49
Showing 1 changed file with 16 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "run_automl_pipeline:tabular"
"id": "cbedbbde33ca"
},
"outputs": [],
"source": [
Expand Down Expand Up @@ -981,13 +981,15 @@
},
"outputs": [],
"source": [
"for instance in instances:\n",
"responses = []\n",
"for i, instance in enumerate(instances):\n",
" response = endpoint.predict(instances=[instance])\n",
"\n",
"prediction = response[0]\n",
" responses.append(response)\n",
" if i % 100 == 0:\n",
" print(f\"Completed {i} rows.\")\n",
"\n",
"# print the prediction for the first instance\n",
"print(prediction[0])"
"print(responses[0])"
]
},
{
Expand Down Expand Up @@ -1144,13 +1146,15 @@
},
"outputs": [],
"source": [
"for instance in instances:\n",
"responses = []\n",
"for i, instance in enumerate(instances):\n",
" response = endpoint.predict(instances=[instance])\n",
"\n",
"prediction = response[0]\n",
" responses.append(response)\n",
" if i % 100 == 0:\n",
" print(f\"Completed {i} rows.\")\n",
"\n",
"# print the prediction for the first instance\n",
"print(prediction[0])"
"print(responses[0])"
]
},
{
Expand Down Expand Up @@ -1273,6 +1277,9 @@
"# Delete the model\n",
"model.delete()\n",
"\n",
"# Delete the dataset created in Vetex AI\n",
"dataset.delete()\n",
"\n",
"# Delete the BigQuery table\n",
"! bq rm -f {PROJECT_ID}.model_deployment_monitoring_{ENDPOINT_ID}"
]
Expand Down

0 comments on commit f130e49

Please sign in to comment.