fix: Update TimesFM 2.0 deployment notebook to use GCS path as MODEL_ID

PiperOrigin-RevId: 844826585
This commit is contained in:
Vertex MG Team
2025-12-15 10:25:10 -08:00
committed by Copybara-Service
parent 0ba5a62cc9
commit 23e64ca76f
@@ -204,7 +204,6 @@
"\n",
"VERTEX_AI_MODEL_GARDEN_TIMESFM = \"gs://vertex-model-garden-public-us/timesfm\" # @param {type:\"string\", isTemplate:true} [\"gs://vertex-model-garden-public-us/timesfm\", \"gs://vertex-model-garden-public-eu/timesfm\", \"gs://vertex-model-garden-public-asia/timesfm\"]\n",
"MODEL_VARIANT = \"timesfm-2.0-500m-jax\" # @param [\"timesfm-2.0-500m-jax\"]\n",
"hf_model_id = \"google/\" + MODEL_VARIANT\n",
"\n",
"\n",
"print(\n",
@@ -320,7 +319,6 @@
"\n",
"def deploy_model(\n",
" model_name: str,\n",
" base_model_id: str,\n",
" checkpoint_path: str,\n",
" horizon: str,\n",
" machine_type: str = \"g2-standard-8\",\n",
@@ -347,13 +345,12 @@
"\n",
" model = aiplatform.Model.upload(\n",
" display_name=model_name_with_time,\n",
" artifact_uri=checkpoint_path,\n",
" serving_container_image_uri=SERVE_DOCKER_URI,\n",
" serving_container_ports=[8080],\n",
" serving_container_predict_route=\"/predict\",\n",
" serving_container_health_route=\"/health\",\n",
" serving_container_environment_variables={\n",
" \"MODEL_ID\": base_model_id,\n",
" \"MODEL_ID\": checkpoint_path,\n",
" \"DEPLOY_SOURCE\": deploy_source,\n",
" \"TIMESFM_HORIZON\": str(horizon),\n",
" \"TIMESFM_BACKEND\": timesfm_backend,\n",
@@ -385,7 +382,6 @@
"\n",
"models[\"timesfm\"], endpoints[\"timesfm\"] = deploy_model(\n",
" model_name=f\"timesfm-{MODEL_VARIANT}\",\n",
" base_model_id=hf_model_id,\n",
" checkpoint_path=checkpoint_path,\n",
" horizon=horizon,\n",
" machine_type=machine_type,\n",