i am trying to deploy a model in Vertex AI pipeline component using DeployModelRequest
. I try to get the model using GetModelRequest
model_name = f'projects/{project}/locations/{location}/models/{model_id}'
model_request = aiplatform_v1.types.GetModelRequest(name=model_name)
model_info = client_model.get_model(request=model_request)
deploy_request = aiplatform_v1.types.DeployModelRequest(endpoint=end_point,
deployed_model=model_info)
client.deploy_model(request=deploy_request)
but this gives:
TypeError: Parameter to MergeFrom() must be instance of same class: expected
google.cloud.aiplatform.v1.DeployedModel got Model
I have also tried deployed_model=model_info.deployed_models[0]
but this gave:
TypeError: Parameter to MergeFrom() must be instance of same class: expected
google.cloud.aiplatform.v1.DeployedModel got DeployedModelRef.
So what do I use for deployed_model
?