Skip to content

Commit 4202177

Browse files
gcf-owl-bot[bot]copybara-github
authored andcommitted
Copybara import of the project:
-- 33e0691 by Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>: feat: add invoke_route_prefix to ModelContainerSpec in aiplatform v1 models.proto PiperOrigin-RevId: 775862178 Source-Link: googleapis/googleapis@4667a43 Source-Link: googleapis/googleapis-gen@5034818 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNTAzNDgxODUyYjBhZmVhNGJiNmUyZWQyZmVlMjI1YWIwYTNjMWQwNiJ9 -- ff62279 by Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>: 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md COPYBARA_INTEGRATE_REVIEW=#5484 from googleapis:owl-bot-copy ff62279 PiperOrigin-RevId: 775961596
1 parent 5a0df36 commit 4202177

File tree

6 files changed

+23
-2
lines changed

6 files changed

+23
-2
lines changed

google/cloud/aiplatform_v1/types/model.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1060,6 +1060,17 @@ class ModelContainerSpec(proto.Message):
10601060
available to your container code as the
10611061
```AIP_DEPLOYED_MODEL_ID`` environment
10621062
variable <https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables>`__.)
1063+
invoke_route_prefix (str):
1064+
Immutable. Invoke route prefix for the custom container.
1065+
"/*" is the only supported value right now. By setting this
1066+
field, any non-root route on this model will be accessible
1067+
with invoke http call eg: "/invoke/foo/bar", however the
1068+
[PredictionService.Invoke] RPC is not supported yet.
1069+
1070+
Only one of ``predict_route`` or ``invoke_route_prefix`` can
1071+
be set, and we default to using ``predict_route`` if this
1072+
field is not set. If this field is set, the Model can only
1073+
be deployed to dedicated endpoint.
10631074
grpc_ports (MutableSequence[google.cloud.aiplatform_v1.types.Port]):
10641075
Immutable. List of ports to expose from the container.
10651076
Vertex AI sends gRPC prediction requests that it receives to
@@ -1120,6 +1131,10 @@ class ModelContainerSpec(proto.Message):
11201131
proto.STRING,
11211132
number=7,
11221133
)
1134+
invoke_route_prefix: str = proto.Field(
1135+
proto.STRING,
1136+
number=15,
1137+
)
11231138
grpc_ports: MutableSequence["Port"] = proto.RepeatedField(
11241139
proto.MESSAGE,
11251140
number=9,

samples/generated_samples/snippet_metadata_google.cloud.aiplatform.v1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"language": "PYTHON",
1010
"name": "google-cloud-aiplatform",
11-
"version": "1.99.0"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

samples/generated_samples/snippet_metadata_google.cloud.aiplatform.v1beta1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"language": "PYTHON",
1010
"name": "google-cloud-aiplatform",
11-
"version": "1.99.0"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

tests/unit/gapic/aiplatform_v1/test_job_service.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28029,6 +28029,7 @@ def test_create_batch_prediction_job_rest_call_success(request_type):
2802928029
"ports": [{"container_port": 1511}],
2803028030
"predict_route": "predict_route_value",
2803128031
"health_route": "health_route_value",
28032+
"invoke_route_prefix": "invoke_route_prefix_value",
2803228033
"grpc_ports": {},
2803328034
"deployment_timeout": {"seconds": 751, "nanos": 543},
2803428035
"shared_memory_size_mb": 2231,
@@ -35846,6 +35847,7 @@ async def test_create_batch_prediction_job_rest_asyncio_call_success(request_typ
3584635847
"ports": [{"container_port": 1511}],
3584735848
"predict_route": "predict_route_value",
3584835849
"health_route": "health_route_value",
35850+
"invoke_route_prefix": "invoke_route_prefix_value",
3584935851
"grpc_ports": {},
3585035852
"deployment_timeout": {"seconds": 751, "nanos": 543},
3585135853
"shared_memory_size_mb": 2231,

tests/unit/gapic/aiplatform_v1/test_model_service.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14886,6 +14886,7 @@ def test_update_model_rest_call_success(request_type):
1488614886
"ports": [{"container_port": 1511}],
1488714887
"predict_route": "predict_route_value",
1488814888
"health_route": "health_route_value",
14889+
"invoke_route_prefix": "invoke_route_prefix_value",
1488914890
"grpc_ports": {},
1489014891
"deployment_timeout": {"seconds": 751, "nanos": 543},
1489114892
"shared_memory_size_mb": 2231,
@@ -18870,6 +18871,7 @@ async def test_update_model_rest_asyncio_call_success(request_type):
1887018871
"ports": [{"container_port": 1511}],
1887118872
"predict_route": "predict_route_value",
1887218873
"health_route": "health_route_value",
18874+
"invoke_route_prefix": "invoke_route_prefix_value",
1887318875
"grpc_ports": {},
1887418876
"deployment_timeout": {"seconds": 751, "nanos": 543},
1887518877
"shared_memory_size_mb": 2231,

tests/unit/gapic/aiplatform_v1/test_pipeline_service.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9122,6 +9122,7 @@ def test_create_training_pipeline_rest_call_success(request_type):
91229122
"ports": [{"container_port": 1511}],
91239123
"predict_route": "predict_route_value",
91249124
"health_route": "health_route_value",
9125+
"invoke_route_prefix": "invoke_route_prefix_value",
91259126
"grpc_ports": {},
91269127
"deployment_timeout": {"seconds": 751, "nanos": 543},
91279128
"shared_memory_size_mb": 2231,
@@ -12070,6 +12071,7 @@ async def test_create_training_pipeline_rest_asyncio_call_success(request_type):
1207012071
"ports": [{"container_port": 1511}],
1207112072
"predict_route": "predict_route_value",
1207212073
"health_route": "health_route_value",
12074+
"invoke_route_prefix": "invoke_route_prefix_value",
1207312075
"grpc_ports": {},
1207412076
"deployment_timeout": {"seconds": 751, "nanos": 543},
1207512077
"shared_memory_size_mb": 2231,

0 commit comments

Comments
 (0)