chore: prediction psc private endpoint, add service attachment best practises (#3863)

Co-authored-by: TJ(Tianjiao) Liu <tianjiaoliu@google.com>
This commit is contained in:
TJ-Liu
2025-03-07 14:20:42 +00:00
committed by GitHub
co-authored by TJ Liu
parent 4078d9449a
commit 22d27fafe7
@@ -305,6 +305,31 @@
"model.wait()"
]
},
{
"cell_type": "markdown",
"metadata": {
"id": "862ed6c4afe2"
},
"source": [
"You can also use your existing model."
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "6cfdcfeb6217"
},
"outputs": [],
"source": [
"# for model in aiplatform.Model.list():\n",
"# if model.display_name == \"your model's display name\":\n",
"# print(model.display_name)\n",
"# print(model.gca_resource.name)\n",
"# break\n",
"# model = aiplatform.Model('projects/PROJECT_ID/locations/REGION/models/MODEL_ID')"
]
},
{
"cell_type": "markdown",
"metadata": {
@@ -389,6 +414,11 @@
"source": [
"### Create Forwarding Rule in Consumer Project\n",
"\n",
"#### Best Practises\n",
"Service attachment is a network resource that are used by multiple prediction endpoints. It is recommended to have a 1-1 mapping between the service attachment and forwarding rules/ip address. And this forwarding rule/ip address can be used to access all endpoints using the corresponding service attachment. \n",
"Please note service attachment will only be preserved when there is active deployed model. If all models are undeployed from the endpoint for a while, the service attachment will be recycled and a new one will be created when there is a new model deployed. This means that the service attachment can change for the same endpoint if no active models are deployed. Then the forwarding rule should be deleted and recreated to with the new service attachment.\n",
"\n",
"#### Create the resources\n",
"First, find the service attachment from the endpoint and deployed model."
]
},