Skip to content

Commit ca52e70

Browse files
vertex-mg-botcopybara-github
authored andcommitted
E5 Notebook to support dedicated endpoint
PiperOrigin-RevId: 770609921
1 parent 2fe032e commit ca52e70

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

notebooks/community/model_garden/model_garden_e5.ipynb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,9 @@
396396
" ],\n",
397397
" },\n",
398398
"]\n",
399-
"response = endpoint.predict(instances=instances)\n",
399+
"response = endpoint.predict(\n",
400+
" instances=instances, use_dedicated_endpoint=use_dedicated_endpoint\n",
401+
")\n",
400402
"\n",
401403
"for prediction in response.predictions:\n",
402404
" embeddings = Tensor(prediction)\n",
@@ -470,7 +472,9 @@
470472
"\n",
471473
"instances = [{\"inputs\": queries + documents}]\n",
472474
"\n",
473-
"response = endpoint.predict(instances=instances)\n",
475+
"response = endpoint.predict(\n",
476+
" instances=instances, use_dedicated_endpoint=use_dedicated_endpoint\n",
477+
")\n",
474478
"\n",
475479
"for prediction in response.predictions:\n",
476480
" embeddings = Tensor(prediction)\n",

0 commit comments

Comments
 (0)