Skip to content

Commit

Permalink
feat: add TPU_V2 & TPU_V3 values to AcceleratorType in aiplatform v1/…
Browse files Browse the repository at this point in the history
…v1beta1 accelerator_type.proto (#1010)

* chore: use gapic-generator-python 0.63.2
docs: add generated snippets

PiperOrigin-RevId: 427792504

Source-Link: googleapis/googleapis@55b9e1e

Source-Link: googleapis/googleapis-gen@bf4e86b
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYmY0ZTg2Yjc1M2Y0MmNiMGVkYjFmZDUxZmJlODQwZDdkYTBhMWNkZSJ9

* 🦉 Updates from OwlBot

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* chore(python): Prepare google/cloud/certificatemanager v1 BUILD.bazel for release

PiperOrigin-RevId: 428507726

Source-Link: googleapis/googleapis@82528cf

Source-Link: googleapis/googleapis-gen@9108224
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOTEwODIyNDIyNjhhN2ViOGM4ZjQ3MDQ4ZTg2MjgyNDIwZDkzZDNjMCJ9

* 🦉 Updates from OwlBot

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* docs(aiplatform): fix misformatted field description

PiperOrigin-RevId: 429098186

Source-Link: googleapis/googleapis@e75c527

Source-Link: googleapis/googleapis-gen@6114713
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNjExNDcxMzMzODE4Zjg4ZjY2YmZlMjRhYzk3ZDIwNjRjZTBiNTJhZCJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* feat: add TPU_V2 & TPU_V3 values to AcceleratorType in aiplatform v1/v1beta1 accelerator_type.proto

PiperOrigin-RevId: 430259767

Source-Link: googleapis/googleapis@f873e7f

Source-Link: googleapis/googleapis-gen@49f573f
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNDlmNTczZjNiNzZkYTg4ODBkM2E4MmI3OTAzMDM2ZmFkMWEzYWZjNSJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <[email protected]>
  • Loading branch information
3 people authored Feb 22, 2022
1 parent ef3fcc8 commit 09c2e8a
Show file tree
Hide file tree
Showing 832 changed files with 55,828 additions and 3,244 deletions.
229 changes: 229 additions & 0 deletions google/cloud/aiplatform_v1/services/dataset_service/async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,35 @@ async def create_dataset(
) -> operation_async.AsyncOperation:
r"""Creates a Dataset.
.. code-block::
from google.cloud import aiplatform_v1
def sample_create_dataset():
# Create a client
client = aiplatform_v1.DatasetServiceClient()
# Initialize request argument(s)
dataset = aiplatform_v1.Dataset()
dataset.display_name = "display_name_value"
dataset.metadata_schema_uri = "metadata_schema_uri_value"
dataset.metadata.null_value = "NULL_VALUE"
request = aiplatform_v1.CreateDatasetRequest(
parent="parent_value",
dataset=dataset,
)
# Make the request
operation = client.create_dataset(request=request)
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
Args:
request (Union[google.cloud.aiplatform_v1.types.CreateDatasetRequest, dict]):
The request object. Request message for
Expand Down Expand Up @@ -327,6 +356,25 @@ async def get_dataset(
) -> dataset.Dataset:
r"""Gets a Dataset.
.. code-block::
from google.cloud import aiplatform_v1
def sample_get_dataset():
# Create a client
client = aiplatform_v1.DatasetServiceClient()
# Initialize request argument(s)
request = aiplatform_v1.GetDatasetRequest(
name="name_value",
)
# Make the request
response = client.get_dataset(request=request)
# Handle the response
print(response)
Args:
request (Union[google.cloud.aiplatform_v1.types.GetDatasetRequest, dict]):
The request object. Request message for
Expand Down Expand Up @@ -399,6 +447,30 @@ async def update_dataset(
) -> gca_dataset.Dataset:
r"""Updates a Dataset.
.. code-block::
from google.cloud import aiplatform_v1
def sample_update_dataset():
# Create a client
client = aiplatform_v1.DatasetServiceClient()
# Initialize request argument(s)
dataset = aiplatform_v1.Dataset()
dataset.display_name = "display_name_value"
dataset.metadata_schema_uri = "metadata_schema_uri_value"
dataset.metadata.null_value = "NULL_VALUE"
request = aiplatform_v1.UpdateDatasetRequest(
dataset=dataset,
)
# Make the request
response = client.update_dataset(request=request)
# Handle the response
print(response)
Args:
request (Union[google.cloud.aiplatform_v1.types.UpdateDatasetRequest, dict]):
The request object. Request message for
Expand Down Expand Up @@ -487,6 +559,26 @@ async def list_datasets(
) -> pagers.ListDatasetsAsyncPager:
r"""Lists Datasets in a Location.
.. code-block::
from google.cloud import aiplatform_v1
def sample_list_datasets():
# Create a client
client = aiplatform_v1.DatasetServiceClient()
# Initialize request argument(s)
request = aiplatform_v1.ListDatasetsRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_datasets(request=request)
# Handle the response
for response in page_result:
print(response)
Args:
request (Union[google.cloud.aiplatform_v1.types.ListDatasetsRequest, dict]):
The request object. Request message for
Expand Down Expand Up @@ -567,6 +659,29 @@ async def delete_dataset(
) -> operation_async.AsyncOperation:
r"""Deletes a Dataset.
.. code-block::
from google.cloud import aiplatform_v1
def sample_delete_dataset():
# Create a client
client = aiplatform_v1.DatasetServiceClient()
# Initialize request argument(s)
request = aiplatform_v1.DeleteDatasetRequest(
name="name_value",
)
# Make the request
operation = client.delete_dataset(request=request)
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
Args:
request (Union[google.cloud.aiplatform_v1.types.DeleteDatasetRequest, dict]):
The request object. Request message for
Expand Down Expand Up @@ -661,6 +776,34 @@ async def import_data(
) -> operation_async.AsyncOperation:
r"""Imports data into a Dataset.
.. code-block::
from google.cloud import aiplatform_v1
def sample_import_data():
# Create a client
client = aiplatform_v1.DatasetServiceClient()
# Initialize request argument(s)
import_configs = aiplatform_v1.ImportDataConfig()
import_configs.gcs_source.uris = ['uris_value_1', 'uris_value_2']
import_configs.import_schema_uri = "import_schema_uri_value"
request = aiplatform_v1.ImportDataRequest(
name="name_value",
import_configs=import_configs,
)
# Make the request
operation = client.import_data(request=request)
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
Args:
request (Union[google.cloud.aiplatform_v1.types.ImportDataRequest, dict]):
The request object. Request message for
Expand Down Expand Up @@ -755,6 +898,33 @@ async def export_data(
) -> operation_async.AsyncOperation:
r"""Exports data from a Dataset.
.. code-block::
from google.cloud import aiplatform_v1
def sample_export_data():
# Create a client
client = aiplatform_v1.DatasetServiceClient()
# Initialize request argument(s)
export_config = aiplatform_v1.ExportDataConfig()
export_config.gcs_destination.output_uri_prefix = "output_uri_prefix_value"
request = aiplatform_v1.ExportDataRequest(
name="name_value",
export_config=export_config,
)
# Make the request
operation = client.export_data(request=request)
print("Waiting for operation to complete...")
response = operation.result()
# Handle the response
print(response)
Args:
request (Union[google.cloud.aiplatform_v1.types.ExportDataRequest, dict]):
The request object. Request message for
Expand Down Expand Up @@ -847,6 +1017,26 @@ async def list_data_items(
) -> pagers.ListDataItemsAsyncPager:
r"""Lists DataItems in a Dataset.
.. code-block::
from google.cloud import aiplatform_v1
def sample_list_data_items():
# Create a client
client = aiplatform_v1.DatasetServiceClient()
# Initialize request argument(s)
request = aiplatform_v1.ListDataItemsRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_data_items(request=request)
# Handle the response
for response in page_result:
print(response)
Args:
request (Union[google.cloud.aiplatform_v1.types.ListDataItemsRequest, dict]):
The request object. Request message for
Expand Down Expand Up @@ -928,6 +1118,25 @@ async def get_annotation_spec(
) -> annotation_spec.AnnotationSpec:
r"""Gets an AnnotationSpec.
.. code-block::
from google.cloud import aiplatform_v1
def sample_get_annotation_spec():
# Create a client
client = aiplatform_v1.DatasetServiceClient()
# Initialize request argument(s)
request = aiplatform_v1.GetAnnotationSpecRequest(
name="name_value",
)
# Make the request
response = client.get_annotation_spec(request=request)
# Handle the response
print(response)
Args:
request (Union[google.cloud.aiplatform_v1.types.GetAnnotationSpecRequest, dict]):
The request object. Request message for
Expand Down Expand Up @@ -1000,6 +1209,26 @@ async def list_annotations(
) -> pagers.ListAnnotationsAsyncPager:
r"""Lists Annotations belongs to a dataitem
.. code-block::
from google.cloud import aiplatform_v1
def sample_list_annotations():
# Create a client
client = aiplatform_v1.DatasetServiceClient()
# Initialize request argument(s)
request = aiplatform_v1.ListAnnotationsRequest(
parent="parent_value",
)
# Make the request
page_result = client.list_annotations(request=request)
# Handle the response
for response in page_result:
print(response)
Args:
request (Union[google.cloud.aiplatform_v1.types.ListAnnotationsRequest, dict]):
The request object. Request message for
Expand Down
Loading

0 comments on commit 09c2e8a

Please sign in to comment.