Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to undeploy a model, or specifically how to get deployed model's id from shell on Vertex AI?

In order to undeploy a model from an endpoint via shell i must specify the deployed-model-id as described in gcloud ai endpoints undeploy-model

How do i get this deployed model id?

like image 879
Tsvi Sabo Avatar asked Sep 05 '25 01:09

Tsvi Sabo


1 Answers

gcloud ai endpoints describe $ENDPOINT_ID output

Apparently, to get the deployed model id you need the output of gcloud ai endpoints describe ENDPOINT_ID underlined with pink is the deployed model id ('id: ') underlined with yellow is the actual model id,

To get all depoly-model-ids of a model you can do:

gcloud ai endpoints describe $ENDPOINT_ID --region=$GCP_REGION | grep -A 1 "id:" | grep -B 1 $MODEL_ID | grep -v $MODEL_ID

And use it to undeploy a model using:

gcloud ai endpoints undeploy-model ENDPOINT_ID --deployed-model-id=DEPLOYED_MODEL_ID

like image 178
Tsvi Sabo Avatar answered Sep 07 '25 21:09

Tsvi Sabo