Skip to content

Commit

Permalink
feat: Add preview capability to manage DeploymentResourcePools.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 523472441
  • Loading branch information
vertex-sdk-bot authored and copybara-github committed Apr 11, 2023
1 parent 1328a27 commit 5df5da0
Show file tree
Hide file tree
Showing 7 changed files with 829 additions and 5 deletions.
6 changes: 5 additions & 1 deletion google/cloud/aiplatform/base.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-

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

if self._logger.handlers:
# Avoid writing duplicate logs if the logger is created twice.
return

handler = logging.StreamHandler(sys.stdout)
handler.setLevel(logging.INFO)

Expand Down
6 changes: 5 additions & 1 deletion google/cloud/aiplatform/compat/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-

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

services.dataset_service_client = services.dataset_service_client_v1beta1
services.deployment_resource_pool_service_client = (
services.deployment_resource_pool_service_client_v1beta1
)
services.endpoint_service_client = services.endpoint_service_client_v1beta1
services.featurestore_online_serving_service_client = (
services.featurestore_online_serving_service_client_v1beta1
Expand Down Expand Up @@ -59,6 +62,7 @@
types.dataset = types.dataset_v1beta1
types.dataset_service = types.dataset_service_v1beta1
types.deployed_model_ref = types.deployed_model_ref_v1beta1
types.deployment_resource_pool = types.deployment_resource_pool_v1beta1
types.encryption_spec = types.encryption_spec_v1beta1
types.endpoint = types.endpoint_v1beta1
types.endpoint_service = types.endpoint_service_v1beta1
Expand Down
6 changes: 5 additions & 1 deletion google/cloud/aiplatform/compat/services/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-

# Copyright 2021 Google LLC
# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -18,6 +18,9 @@
from google.cloud.aiplatform_v1beta1.services.dataset_service import (
client as dataset_service_client_v1beta1,
)
from google.cloud.aiplatform_v1beta1.services.deployment_resource_pool_service import (
client as deployment_resource_pool_service_client_v1beta1,
)
from google.cloud.aiplatform_v1beta1.services.endpoint_service import (
client as endpoint_service_client_v1beta1,
)
Expand Down Expand Up @@ -119,6 +122,7 @@
vizier_service_client_v1,
# v1beta1
dataset_service_client_v1beta1,
deployment_resource_pool_service_client_v1beta1,
endpoint_service_client_v1beta1,
featurestore_online_serving_service_client_v1beta1,
featurestore_service_client_v1beta1,
Expand Down
6 changes: 5 additions & 1 deletion google/cloud/aiplatform/compat/types/__init__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# -*- coding: utf-8 -*-

# Copyright 2021 Google LLC
# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -30,6 +30,8 @@
dataset_service as dataset_service_v1beta1,
deployed_index_ref as matching_engine_deployed_index_ref_v1beta1,
deployed_model_ref as deployed_model_ref_v1beta1,
deployment_resource_pool as deployment_resource_pool_v1beta1,
deployment_resource_pool_service as deployment_resource_pool_service_v1beta1,
encryption_spec as encryption_spec_v1beta1,
endpoint as endpoint_v1beta1,
endpoint_service as endpoint_service_v1beta1,
Expand Down Expand Up @@ -229,6 +231,8 @@
data_labeling_job_v1beta1,
dataset_v1beta1,
dataset_service_v1beta1,
deployment_resource_pool_v1beta1,
deployment_resource_pool_service_v1beta1,
deployed_model_ref_v1beta1,
encryption_spec_v1beta1,
endpoint_v1beta1,
Expand Down
Loading

0 comments on commit 5df5da0

Please sign in to comment.