Skip to content

Commit 7b7c950

Browse files
authored
chore: Replace AI Platform naming with Vertex AI (#405)
1 parent a2d7b68 commit 7b7c950

24 files changed

Lines changed: 240 additions & 240 deletions

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
# The AI Platform GAPIC libraries are owned by Cloud AI DPE
1111
/google/cloud/aiplatform* @googleapis/cdpe-cloudai
1212

13-
# The AI Platform SDK is owned by Model Builder SDK Dev team
13+
# The Vertex SDK is owned by Model Builder SDK Dev team
1414
/google/cloud/aiplatform/* @googleapis/cloud-aiplatform-model-builder-sdk
1515
/tests/unit/aiplatform/* @googleapis/cloud-aiplatform-model-builder-sdk
1616

.repo-metadata.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"product_documentation": "https://cloud.google.com/ai-platform",
55
"client_documentation": "https://googleapis.dev/python/aiplatform/latest",
66
"issue_tracker": "https://issuetracker.google.com/savedsearches/559744",
7-
"release_level": "beta",
7+
"release_level": "ga",
88
"language": "python",
99
"library_type": "GAPIC_COMBO",
1010
"repo": "googleapis/python-aiplatform",

README.rst

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
Python Client for Cloud AI Platform
1+
Vertex SDK for Python
22
=================================================
33

4-
|beta| |pypi| |versions|
4+
|GA| |pypi| |versions|
55

66

7-
`Cloud AI Platform`_: Google Cloud AI Platform is an integrated suite of machine learning tools and services for building and using ML models with AutoML or custom code. It offers both novices and experts the best workbench for the entire machine learning development lifecycle.
7+
`Vertex AI`_: Google Vertex AI is an integrated suite of machine learning tools and services for building and using ML models with AutoML or custom code. It offers both novices and experts the best workbench for the entire machine learning development lifecycle.
88

99
- `Client Library Documentation`_
1010
- `Product Documentation`_
1111

12-
.. |beta| image:: https://img.shields.io/badge/support-beta-orange.svg
13-
:target: https://github.com/googleapis/google-cloud-python/blob/master/README.rst#beta-support
12+
.. |GA| image:: https://img.shields.io/badge/support-ga-gold.svg
13+
:target: https://github.com/googleapis/google-cloud-python/blob/master/README.rst#general-availability
1414
.. |pypi| image:: https://img.shields.io/pypi/v/google-cloud-aiplatform.svg
1515
:target: https://pypi.org/project/google-cloud-aiplatform/
1616
.. |versions| image:: https://img.shields.io/pypi/pyversions/google-cloud-aiplatform.svg
1717
:target: https://pypi.org/project/google-cloud-aiplatform/
18-
.. _Cloud AI Platform: https://cloud.google.com/ai-platform-unified/docs
18+
.. _Vertex AI: https://cloud.google.com/vertex-ai/docs
1919
.. _Client Library Documentation: https://googleapis.dev/python/aiplatform/latest
20-
.. _Product Documentation: https://cloud.google.com/ai-platform-unified/docs
20+
.. _Product Documentation: https://cloud.google.com/vertex-ai/docs
2121

2222
Quick Start
2323
-----------
@@ -26,12 +26,12 @@ In order to use this library, you first need to go through the following steps:
2626

2727
1. `Select or create a Cloud Platform project.`_
2828
2. `Enable billing for your project.`_
29-
3. `Enable the Cloud AI Platform API.`_
29+
3. `Enable the Vertex AI API.`_
3030
4. `Setup Authentication.`_
3131

3232
.. _Select or create a Cloud Platform project.: https://console.cloud.google.com/project
3333
.. _Enable billing for your project.: https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project
34-
.. _Enable the Cloud AI Platform API.: https://cloud.google.com/ai-platform/docs
34+
.. _Enable the Vertex AI API.: https://cloud.google.com/ai-platform/docs
3535
.. _Setup Authentication.: https://googleapis.dev/python/google-api-core/latest/auth.html
3636

3737
Installation
@@ -72,12 +72,12 @@ Windows
7272
Next Steps
7373
~~~~~~~~~~
7474

75-
- Read the `Client Library Documentation`_ for Cloud AI Platform
75+
- Read the `Client Library Documentation`_ for Vertex AI
7676
API to see other available methods on the client.
77-
- Read the `Cloud AI Platform API Product documentation`_ to learn
77+
- Read the `Vertex AI API Product documentation`_ to learn
7878
more about the product and see How-to Guides.
7979
- View this `README`_ to see the full list of Cloud
8080
APIs that we cover.
8181

82-
.. _Cloud AI Platform API Product documentation: https://cloud.google.com/ai-platform-unified/docs
82+
.. _Vertex AI API Product documentation: https://cloud.google.com/vertex-ai/docs
8383
.. _README: https://github.com/googleapis/google-cloud-python/blob/master/README.rst

google/cloud/aiplatform/base.py

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,14 @@ def __init__(self, name: str = ""):
6060

6161
def log_create_with_lro(
6262
self,
63-
cls: Type["AiPlatformResourceNoun"],
63+
cls: Type["VertexAiResourceNoun"],
6464
lro: Optional[operation.Operation] = None,
6565
):
6666
"""Logs create event with LRO.
6767
6868
Args:
69-
cls (AiPlatformResourceNoune):
70-
AI Platform Resource Noun class that is being created.
69+
cls (VertexAiResourceNoun):
70+
Vertex AI Resource Noun class that is being created.
7171
lro (operation.Operation):
7272
Optional. Backing LRO for creation.
7373
"""
@@ -80,7 +80,7 @@ def log_create_with_lro(
8080

8181
def log_create_complete(
8282
self,
83-
cls: Type["AiPlatformResourceNoun"],
83+
cls: Type["VertexAiResourceNoun"],
8484
resource: proto.Message,
8585
variable_name: str,
8686
):
@@ -89,10 +89,10 @@ def log_create_complete(
8989
Will also include code snippet to instantiate resource in SDK.
9090
9191
Args:
92-
cls (AiPlatformResourceNoun):
93-
AI Platform Resource Noun class that is being created.
92+
cls (VertexAiResourceNoun):
93+
Vertex AI Resource Noun class that is being created.
9494
resource (proto.Message):
95-
AI Platform Resourc proto.Message
95+
Vertex AI Resourc proto.Message
9696
variable_name (str): Name of variable to use for code snippet
9797
"""
9898
self._logger.info(f"{cls.__name__} created. Resource name: {resource.name}")
@@ -103,7 +103,7 @@ def log_create_complete(
103103

104104
def log_create_complete_with_getter(
105105
self,
106-
cls: Type["AiPlatformResourceNoun"],
106+
cls: Type["VertexAiResourceNoun"],
107107
resource: proto.Message,
108108
variable_name: str,
109109
):
@@ -112,10 +112,10 @@ def log_create_complete_with_getter(
112112
Will also include code snippet to instantiate resource in SDK.
113113
114114
Args:
115-
cls (AiPlatformResourceNoun):
116-
AI Platform Resource Noun class that is being created.
115+
cls (VertexAiResourceNoun):
116+
Vertex AI Resource Noun class that is being created.
117117
resource (proto.Message):
118-
AI Platform Resourc proto.Message
118+
Vertex AI Resourc proto.Message
119119
variable_name (str): Name of variable to use for code snippet
120120
"""
121121
self._logger.info(f"{cls.__name__} created. Resource name: {resource.name}")
@@ -125,14 +125,14 @@ def log_create_complete_with_getter(
125125
)
126126

127127
def log_action_start_against_resource(
128-
self, action: str, noun: str, resource_noun_obj: "AiPlatformResourceNoun"
128+
self, action: str, noun: str, resource_noun_obj: "VertexAiResourceNoun"
129129
):
130130
"""Logs intention to start an action against a resource.
131131
132132
Args:
133133
action (str): Action to complete against the resource ie: "Deploying". Can be empty string.
134134
noun (str): Noun the action acts on against the resource. Can be empty string.
135-
resource_noun_obj (AiPlatformResourceNoun):
135+
resource_noun_obj (VertexAiResourceNoun):
136136
Resource noun object the action is acting against.
137137
"""
138138
self._logger.info(
@@ -143,15 +143,15 @@ def log_action_started_against_resource_with_lro(
143143
self,
144144
action: str,
145145
noun: str,
146-
cls: Type["AiPlatformResourceNoun"],
146+
cls: Type["VertexAiResourceNoun"],
147147
lro: operation.Operation,
148148
):
149149
"""Logs an action started against a resource with lro.
150150
151151
Args:
152152
action (str): Action started against resource. ie: "Deploy". Can be empty string.
153153
noun (str): Noun the action acts on against the resource. Can be empty string.
154-
cls (AiPlatformResourceNoun):
154+
cls (VertexAiResourceNoun):
155155
Resource noun object the action is acting against.
156156
lro (operation.Operation): Backing LRO for action.
157157
"""
@@ -160,14 +160,14 @@ def log_action_started_against_resource_with_lro(
160160
)
161161

162162
def log_action_completed_against_resource(
163-
self, noun: str, action: str, resource_noun_obj: "AiPlatformResourceNoun"
163+
self, noun: str, action: str, resource_noun_obj: "VertexAiResourceNoun"
164164
):
165165
"""Logs action completed against resource.
166166
167167
Args:
168168
noun (str): Noun the action acts on against the resource. Can be empty string.
169169
action (str): Action started against resource. ie: "Deployed". Can be empty string.
170-
resource_noun_obj (AiPlatformResourceNoun):
170+
resource_noun_obj (VertexAiResourceNoun):
171171
Resource noun object the action is acting against
172172
"""
173173
self._logger.info(
@@ -385,8 +385,8 @@ def __repr__(self) -> str:
385385
return object.__repr__(self)
386386

387387

388-
class AiPlatformResourceNoun(metaclass=abc.ABCMeta):
389-
"""Base class the AI Platform resource nouns.
388+
class VertexAiResourceNoun(metaclass=abc.ABCMeta):
389+
"""Base class the Vertex AI resource nouns.
390390
391391
Subclasses require two class attributes:
392392
@@ -400,7 +400,7 @@ class AiPlatformResourceNoun(metaclass=abc.ABCMeta):
400400
@property
401401
@classmethod
402402
@abc.abstractmethod
403-
def client_class(cls) -> Type[utils.AiPlatformServiceClientWithOverride]:
403+
def client_class(cls) -> Type[utils.VertexAiServiceClientWithOverride]:
404404
"""Client class required to interact with resource with optional
405405
overrides."""
406406
pass
@@ -464,7 +464,7 @@ def _instantiate_client(
464464
cls,
465465
location: Optional[str] = None,
466466
credentials: Optional[auth_credentials.Credentials] = None,
467-
) -> utils.AiPlatformServiceClientWithOverride:
467+
) -> utils.VertexAiServiceClientWithOverride:
468468
"""Helper method to instantiate service client for resource noun.
469469
470470
Args:
@@ -473,7 +473,7 @@ def _instantiate_client(
473473
Optional custom credentials to use when accessing interacting with
474474
resource noun.
475475
Returns:
476-
client (utils.AiPlatformServiceClientWithOverride):
476+
client (utils.VertexAiServiceClientWithOverride):
477477
Initialized service client for this service noun with optional overrides.
478478
"""
479479
return initializer.global_config.create_client(
@@ -580,7 +580,7 @@ def optional_sync(
580580
return_input_arg: Optional[str] = None,
581581
bind_future_to_self: bool = True,
582582
):
583-
"""Decorator for AiPlatformResourceNounWithFutureManager with optional sync
583+
"""Decorator for VertexAiResourceNounWithFutureManager with optional sync
584584
support.
585585
586586
Methods with this decorator should include a "sync" argument that defaults to
@@ -714,8 +714,8 @@ def wrapper(*args, **kwargs):
714714
return optional_run_in_thread
715715

716716

717-
class AiPlatformResourceNounWithFutureManager(AiPlatformResourceNoun, FutureManager):
718-
"""Allows optional asynchronous calls to this AI Platform Resource
717+
class VertexAiResourceNounWithFutureManager(VertexAiResourceNoun, FutureManager):
718+
"""Allows optional asynchronous calls to this Vertex AI Resource
719719
Nouns."""
720720

721721
def __init__(
@@ -735,7 +735,7 @@ def __init__(
735735
resource noun.
736736
resource_name(str): A fully-qualified resource name or ID.
737737
"""
738-
AiPlatformResourceNoun.__init__(
738+
VertexAiResourceNoun.__init__(
739739
self,
740740
project=project,
741741
location=location,
@@ -751,7 +751,7 @@ def _empty_constructor(
751751
location: Optional[str] = None,
752752
credentials: Optional[auth_credentials.Credentials] = None,
753753
resource_name: Optional[str] = None,
754-
) -> "AiPlatformResourceNounWithFutureManager":
754+
) -> "VertexAiResourceNounWithFutureManager":
755755
"""Initializes with all attributes set to None.
756756
757757
The attributes should be populated after a future is complete. This allows
@@ -768,7 +768,7 @@ def _empty_constructor(
768768
An instance of this class with attributes set to None.
769769
"""
770770
self = cls.__new__(cls)
771-
AiPlatformResourceNoun.__init__(
771+
VertexAiResourceNoun.__init__(
772772
self,
773773
project=project,
774774
location=location,
@@ -780,12 +780,12 @@ def _empty_constructor(
780780
return self
781781

782782
def _sync_object_with_future_result(
783-
self, result: "AiPlatformResourceNounWithFutureManager"
783+
self, result: "VertexAiResourceNounWithFutureManager"
784784
):
785785
"""Populates attributes from a Future result to this object.
786786
787787
Args:
788-
result: AiPlatformResourceNounWithFutureManager
788+
result: VertexAiResourceNounWithFutureManager
789789
Required. Result of future with same type as this object.
790790
"""
791791
sync_attributes = [
@@ -811,12 +811,12 @@ def _construct_sdk_resource_from_gapic(
811811
project: Optional[str] = None,
812812
location: Optional[str] = None,
813813
credentials: Optional[auth_credentials.Credentials] = None,
814-
) -> AiPlatformResourceNoun:
814+
) -> VertexAiResourceNoun:
815815
"""Given a GAPIC resource object, return the SDK representation.
816816
817817
Args:
818818
gapic_resource (proto.Message):
819-
A GAPIC representation of an AI Platform resource, usually
819+
A GAPIC representation of an Vertex AI resource, usually
820820
retrieved by a get_* or in a list_* API call.
821821
project (str):
822822
Optional. Project to construct SDK object from. If not set,
@@ -829,7 +829,7 @@ def _construct_sdk_resource_from_gapic(
829829
Overrides credentials set in aiplatform.init.
830830
831831
Returns:
832-
AiPlatformResourceNoun:
832+
VertexAiResourceNoun:
833833
An initialized SDK object that represents GAPIC type.
834834
"""
835835
sdk_resource = self._empty_constructor(
@@ -849,8 +849,8 @@ def _list(
849849
project: Optional[str] = None,
850850
location: Optional[str] = None,
851851
credentials: Optional[auth_credentials.Credentials] = None,
852-
) -> List[AiPlatformResourceNoun]:
853-
"""Private method to list all instances of this AI Platform Resource,
852+
) -> List[VertexAiResourceNoun]:
853+
"""Private method to list all instances of this Vertex AI Resource,
854854
takes a `cls_filter` arg to filter to a particular SDK resource
855855
subclass.
856856
@@ -878,7 +878,7 @@ def _list(
878878
credentials set in aiplatform.init.
879879
880880
Returns:
881-
List[AiPlatformResourceNoun] - A list of SDK resource objects
881+
List[VertexAiResourceNoun] - A list of SDK resource objects
882882
"""
883883
self = cls._empty_constructor(
884884
project=project, location=location, credentials=credentials
@@ -918,8 +918,8 @@ def _list_with_local_order(
918918
project: Optional[str] = None,
919919
location: Optional[str] = None,
920920
credentials: Optional[auth_credentials.Credentials] = None,
921-
) -> List[AiPlatformResourceNoun]:
922-
"""Private method to list all instances of this AI Platform Resource,
921+
) -> List[VertexAiResourceNoun]:
922+
"""Private method to list all instances of this Vertex AI Resource,
923923
takes a `cls_filter` arg to filter to a particular SDK resource
924924
subclass. Provides client-side sorting when a list API doesn't support
925925
`order_by`.
@@ -948,7 +948,7 @@ def _list_with_local_order(
948948
credentials set in aiplatform.init.
949949
950950
Returns:
951-
List[AiPlatformResourceNoun] - A list of SDK resource objects
951+
List[VertexAiResourceNoun] - A list of SDK resource objects
952952
"""
953953

954954
li = cls._list(
@@ -980,8 +980,8 @@ def list(
980980
project: Optional[str] = None,
981981
location: Optional[str] = None,
982982
credentials: Optional[auth_credentials.Credentials] = None,
983-
) -> List[AiPlatformResourceNoun]:
984-
"""List all instances of this AI Platform Resource.
983+
) -> List[VertexAiResourceNoun]:
984+
"""List all instances of this Vertex AI Resource.
985985
986986
Example Usage:
987987
@@ -1010,7 +1010,7 @@ def list(
10101010
credentials set in aiplatform.init.
10111011
10121012
Returns:
1013-
List[AiPlatformResourceNoun] - A list of SDK resource objects
1013+
List[VertexAiResourceNoun] - A list of SDK resource objects
10141014
"""
10151015

10161016
return cls._list(
@@ -1023,7 +1023,7 @@ def list(
10231023

10241024
@optional_sync()
10251025
def delete(self, sync: bool = True) -> None:
1026-
"""Deletes this AI Platform resource. WARNING: This deletion is
1026+
"""Deletes this Vertex AI resource. WARNING: This deletion is
10271027
permament.
10281028
10291029
Args:
@@ -1042,7 +1042,7 @@ def delete(self, sync: bool = True) -> None:
10421042

10431043
def __repr__(self) -> str:
10441044
if self._gca_resource:
1045-
return AiPlatformResourceNoun.__repr__(self)
1045+
return VertexAiResourceNoun.__repr__(self)
10461046

10471047
return FutureManager.__repr__(self)
10481048

0 commit comments

Comments
 (0)