Reputation: 568
I am trying to un-deploy model from an endpoint following this documentation.
Endpoint.undeploy(deployed_model_id=model_id)
I even tried google api. Same Issue with this as well.
Getting 404 error
The Deployed Model with ID
2367889687867
is missing.
INFO:
traffic_percentage=100
.Upvotes: 1
Views: 1989
Reputation: 1428
The deployed_model_id
is different from the model_id
.That’s why you are getting the Error 404, it is searching for something that is not the same.
You can get the deployed_model_id
by:
Using list_models()
brings you a list of all the deployed models ids, while using list()
only brings one, you can add filters such as display_name
, model_id
, region
, etc.
list(
filter= ‘display_name= “display_name”’,
)
You also can get the deployed_model_id
using the Cloud SDK.
gcloud ai models list --region=$REGION --filter="DISPLAY_NAME: $NAME" | grep "MODEL_ID" | cut -f2 -d: | sed 's/\s//'
Additionally, you can specify the deployed_model_id
when you are deploying your model using Cloud SDK the command should look like:
gcloud ai endpoints deploy-model $endpoint --project=$project --region=$region --model=$model_id --display-name=$model_name --deployed-model-id=$deployed_model_id
There are some flags that are required when you deploy a model such as endpoint, project, region, model and display name. And there are others that are optional flags that you can use deployed_model_id is one of them.(I don’t know if this is possible but you could set the deployed_model_id as the same as the model_id).
Upvotes: 1