Skip to content

Commit 5df5da0

Browse files
vertex-sdk-botcopybara-github
authored andcommitted
feat: Add preview capability to manage DeploymentResourcePools.
PiperOrigin-RevId: 523472441
1 parent 1328a27 commit 5df5da0

File tree

7 files changed

+829
-5
lines changed

7 files changed

+829
-5
lines changed

google/cloud/aiplatform/base.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22

3-
# Copyright 2022 Google LLC
3+
# Copyright 2023 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
@@ -69,6 +69,10 @@ def __init__(self, name: str):
6969
self._logger = logging.getLogger(name)
7070
self._logger.setLevel(logging.INFO)
7171

72+
if self._logger.handlers:
73+
# Avoid writing duplicate logs if the logger is created twice.
74+
return
75+
7276
handler = logging.StreamHandler(sys.stdout)
7377
handler.setLevel(logging.INFO)
7478

google/cloud/aiplatform/compat/__init__.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22

3-
# Copyright 2022 Google LLC
3+
# Copyright 2023 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
@@ -26,6 +26,9 @@
2626
if DEFAULT_VERSION == V1BETA1:
2727

2828
services.dataset_service_client = services.dataset_service_client_v1beta1
29+
services.deployment_resource_pool_service_client = (
30+
services.deployment_resource_pool_service_client_v1beta1
31+
)
2932
services.endpoint_service_client = services.endpoint_service_client_v1beta1
3033
services.featurestore_online_serving_service_client = (
3134
services.featurestore_online_serving_service_client_v1beta1
@@ -59,6 +62,7 @@
5962
types.dataset = types.dataset_v1beta1
6063
types.dataset_service = types.dataset_service_v1beta1
6164
types.deployed_model_ref = types.deployed_model_ref_v1beta1
65+
types.deployment_resource_pool = types.deployment_resource_pool_v1beta1
6266
types.encryption_spec = types.encryption_spec_v1beta1
6367
types.endpoint = types.endpoint_v1beta1
6468
types.endpoint_service = types.endpoint_service_v1beta1

google/cloud/aiplatform/compat/services/__init__.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22

3-
# Copyright 2021 Google LLC
3+
# Copyright 2023 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
@@ -18,6 +18,9 @@
1818
from google.cloud.aiplatform_v1beta1.services.dataset_service import (
1919
client as dataset_service_client_v1beta1,
2020
)
21+
from google.cloud.aiplatform_v1beta1.services.deployment_resource_pool_service import (
22+
client as deployment_resource_pool_service_client_v1beta1,
23+
)
2124
from google.cloud.aiplatform_v1beta1.services.endpoint_service import (
2225
client as endpoint_service_client_v1beta1,
2326
)
@@ -119,6 +122,7 @@
119122
vizier_service_client_v1,
120123
# v1beta1
121124
dataset_service_client_v1beta1,
125+
deployment_resource_pool_service_client_v1beta1,
122126
endpoint_service_client_v1beta1,
123127
featurestore_online_serving_service_client_v1beta1,
124128
featurestore_service_client_v1beta1,

google/cloud/aiplatform/compat/types/__init__.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# -*- coding: utf-8 -*-
22

3-
# Copyright 2021 Google LLC
3+
# Copyright 2023 Google LLC
44
#
55
# Licensed under the Apache License, Version 2.0 (the "License");
66
# you may not use this file except in compliance with the License.
@@ -30,6 +30,8 @@
3030
dataset_service as dataset_service_v1beta1,
3131
deployed_index_ref as matching_engine_deployed_index_ref_v1beta1,
3232
deployed_model_ref as deployed_model_ref_v1beta1,
33+
deployment_resource_pool as deployment_resource_pool_v1beta1,
34+
deployment_resource_pool_service as deployment_resource_pool_service_v1beta1,
3335
encryption_spec as encryption_spec_v1beta1,
3436
endpoint as endpoint_v1beta1,
3537
endpoint_service as endpoint_service_v1beta1,
@@ -229,6 +231,8 @@
229231
data_labeling_job_v1beta1,
230232
dataset_v1beta1,
231233
dataset_service_v1beta1,
234+
deployment_resource_pool_v1beta1,
235+
deployment_resource_pool_service_v1beta1,
232236
deployed_model_ref_v1beta1,
233237
encryption_spec_v1beta1,
234238
endpoint_v1beta1,

0 commit comments

Comments
 (0)