Skip to content

Commit

Permalink
Update yolov8 model to use model and endpoint dictionary.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 706539649
  • Loading branch information
vertex-mg-bot authored and copybara-github committed Dec 16, 2024
1 parent 20138d9 commit db440cc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,7 @@
" \"DEPLOY_SOURCE\": \"notebook\",\n",
"}\n",
"\n",
"model = aiplatform.Model.upload(\n",
"models[\"yolov8\"] = aiplatform.Model.upload(\n",
" display_name=upload_job_name,\n",
" artifact_uri=model_dir,\n",
" serving_container_image_uri=SERVING_CONTAINER_URI,\n",
Expand All @@ -505,7 +505,7 @@
"\n",
"deploy_model_name = common_util.get_job_name_with_datetime(\"deploy_yolov8\")\n",
"\n",
"endpoint = model.deploy(\n",
"endpoints[\"yolov8\"] = models[\"yolov8\"].deploy(\n",
" deployed_model_display_name=deploy_model_name,\n",
" machine_type=\"n1-standard-4\",\n",
" traffic_split={\"0\": 100},\n",
Expand All @@ -516,7 +516,7 @@
")\n",
"\n",
"\n",
"endpoint_id = endpoint.name\n",
"endpoint_id = endpoints[\"yolov8\"].name\n",
"print(\"The endpoint id is: \", endpoint_id)"
]
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,6 @@
"\n",
"REGION = \"\" # @param {type:\"string\"}\n",
"\n",
"! pip3 install --upgrade pip\n",
"! git clone https://github.com/GoogleCloudPlatform/vertex-ai-samples.git\n",
"\n",
"import datetime\n",
Expand Down

0 comments on commit db440cc

Please sign in to comment.