I try to deploy a Vertex AI model using the following code:
from google.cloud import aiplatform # google-cloud-aiplatform 1.60.0
aiplatform.init(project=PROJECT_ID, location=LOCATION)
model = aiplatform.Model(model_name=f"projects/{PROJECT_ID}/locations/{LOCATION}/models/{MODEL_ID}")\endpoint_path = client.endpoint_path(project=PROJECT_ID, location=location, endpoint=endpoint_id)
model_endpoint = model.deploy()
But I get the following error:
File /opt/conda/envs/python311/lib/python3.11/site-packages/google/cloud/aiplatform/models.py:4876, in Model.deploy(self, endpoint, deployed_model_display_name, traffic_percentage, traffic_split, machine_type, min_replica_count, max_replica_count, accelerator_type, accelerator_count, tpu_topology, service_account, explanation_metadata, explanation_parameters, metadata, encryption_spec_key_name, network, sync, deploy_request_timeout, autoscaling_target_cpu_utilization, autoscaling_target_accelerator_duty_cycle, enable_access_logging, disable_container_logging, private_service_connect_config, deployment_resource_pool) 4865 raise ValueError( 4866 "Traffic splitting is not yet supported for PSA based PrivateEndpoint. " 4867 "Try calling deploy() without providing traffic_split. " 4868 “A maximum of one model can be deployed to each private Endpoint.” 4869 ) 4871 explanation_spec = _explanation_utils.create_and_validate_explanation_spec( 4872 explanation_metadata=explanation_metadata, 4873 explanation_parameters=explanation_parameters, 4874 )