You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Sync the contents of the two README files in aiplatform
* add information on importing SDK, SDK preview, and client library namespaces
PiperOrigin-RevId: 570092703
All publicly available SDK features can be found in the :code:`google/cloud/aiplatform` directory.
90
+
Under the hood, Vertex SDK builds on top of GAPIC, which stands for Google API CodeGen.
91
+
The GAPIC library code sits in :code:`google/cloud/aiplatform_v1` and :code:`google/cloud/aiplatform_v1beta1`,
92
+
and it is auto-generated from Google's service proto files.
93
+
94
+
For most developers' programmatic needs, they can follow these steps to figure out which libraries to import:
95
+
96
+
1. Look through :code:`google/cloud/aiplatform` first -- Vertex SDK's APIs will almost always be easier to use and more concise comparing with GAPIC
97
+
2. If the feature that you are looking for cannot be found there, look through :code:`aiplatform_v1` to see if it's available in GAPIC
98
+
3. If it is still in beta phase, it will be available in :code:`aiplatform_v1beta1`
99
+
100
+
If none of the above scenarios could help you find the right tools for your task, please feel free to open a github issue and send us a feature request.
77
101
78
102
Importing
79
103
^^^^^^^^^
80
-
SDK functionality can be used from the root of the package:
104
+
Vertex AI SDK functionality can be used by importing the following namespace:
81
105
82
106
.. code-block:: Python
83
107
84
108
from google.cloud import aiplatform
85
109
110
+
Vertex AI SDK preview functionality can be used by importing the following namespace:
111
+
112
+
.. code-block:: Python
113
+
114
+
from vertexai import preview
115
+
116
+
Vertex AI client library functionality can be used by importing the following namespace:
117
+
118
+
.. code-block:: Python
119
+
86
120
87
121
Initialization
88
122
^^^^^^^^^^^^^^
@@ -104,7 +138,7 @@ Initialize the SDK to store common configurations that you use with the SDK.
104
138
staging_bucket='gs://my_staging_bucket',
105
139
106
140
# custom google.auth.credentials.Credentials
107
-
# environment default creds used if not set
141
+
# environment default credentials used if not set
108
142
credentials=my_credentials,
109
143
110
144
# customer managed encryption key resource name
@@ -116,7 +150,7 @@ Initialize the SDK to store common configurations that you use with the SDK.
Cloud Profiler allows you to profile your remote Vertex AI Training jobs on demand and visualize the results in Vertex AI Tensorboard.
547
+
548
+
To start using the profiler with TensorFlow, update your training script to include the following:
549
+
550
+
.. code-block:: Python
551
+
552
+
from google.cloud.aiplatform.training_utils import cloud_profiler
553
+
...
554
+
cloud_profiler.init()
555
+
556
+
Next, run the job with with a Vertex AI TensorBoard instance. For full details on how to do this, visit https://cloud.google.com/vertex-ai/docs/experiments/tensorboard-overview
557
+
558
+
Finally, visit your TensorBoard in your Google Cloud Console, navigate to the "Profile" tab, and click the `Capture Profile` button. This will allow users to capture profiling statistics for the running jobs.
0 commit comments