Skip to content

Commit

Permalink
Copybara import of the project:
Browse files Browse the repository at this point in the history
--
7c236b1 by Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>:

feat: A new field `search_entry_point` is added to message `.google.cloud.aiplatform.v1beta1.GroundingMetadata`
feat: A new message `SearchEntryPoint` is added
feat: A new method `UpdateDatasetVersion` is added to service `DatasetService`
feat: A new message `UpdateDatasetVersionRequest` is added
feat: A new field `private_service_connect_config` is added to message `.google.cloud.aiplatform.v1beta1.Endpoint`
feat: A new field `app_id` is added to message `.google.cloud.aiplatform.v1beta1.RuntimeConfig`
feat: A new value `INVALID_TOKEN_VALUE` is added to enum `RecordErrorType`
feat: A new field `valid_sparse_record_count` is added to message `.google.cloud.aiplatform.v1beta1.NearestNeighborSearchOperationMetadata`
feat: A new field `invalid_sparse_record_count` is added to message `.google.cloud.aiplatform.v1beta1.NearestNeighborSearchOperationMetadata`
feat: A new message `DirectNotebookSource` is added
feat: A new message `CustomEnvironmentSpec` is added
feat: A new field `direct_notebook_source` is added to message `.google.cloud.aiplatform.v1beta1.NotebookExecutionJob`
feat: A new field `custom_environment_spec` is added to message `.google.cloud.aiplatform.v1beta1.NotebookExecutionJob`
feat: A new message `CreateNotebookExecutionJobRequest` is added
feat: A new field `deploy_task_name` is added to message `.google.cloud.aiplatform.v1beta1.PublisherModel`
feat: A new field `fine_tune` is added to message `.google.cloud.aiplatform.v1beta1.PublisherModel`
feat: A new field `create_notebook_execution_job_request` is added to message `.google.cloud.aiplatform.v1beta1.Schedule`
feat: A new message `RagResource` is added
feat: A new field `rag_resources` is added to message `.google.cloud.aiplatform.v1beta1.VertexRagStore`
feat: A new field `vector_distance_threshold` is added to message `.google.cloud.aiplatform.v1beta1.VertexRagStore`
feat: A new field `failed_rag_files_count` is added to message `.google.cloud.aiplatform.v1beta1.ImportRagFilesResponse`
feat: A new field `skipped_rag_files_count` is added to message `.google.cloud.aiplatform.v1beta1.ImportRagFilesResponse`
feat: A new field `import_rag_files_config` is added to message `.google.cloud.aiplatform.v1beta1.ImportRagFilesOperationMetadata`
feat: A new message `RagResource` is added
feat: A new field `rag_resources` is added to message `.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest`
feat: A new field `vector_distance_threshold` is added to message `.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest`
fix!: An existing method `ChatCompletions` is removed from service `PredictionService`
fix!: An existing message `ChatCompletionsRequest` is removed
docs: A comment for field `rouge_type` in message `.google.cloud.aiplatform.v1beta1.RougeSpec` is changed
docs: A comment for field `file_input_gcs_bucket` in message `.google.cloud.aiplatform.v1beta1.RuntimeConfig` is changed
docs: A comment for field `file_output_gcs_bucket` in message `.google.cloud.aiplatform.v1beta1.RuntimeConfig` is changed
docs: A comment for field `serving_config_name` in message `.google.cloud.aiplatform.v1beta1.RuntimeConfig` is changed
docs: A comment for field `big_query` in message `.google.cloud.aiplatform.v1beta1.FeatureGroup` is changed
docs: A comment for field `parent` in message `.google.cloud.aiplatform.v1beta1.CreateFeatureGroupRequest` is changed
docs: A comment for field `feature_vector` in message `.google.cloud.aiplatform.v1beta1.IndexDatapoint` is changed
docs: A comment for field `vectors_count` in message `.google.cloud.aiplatform.v1beta1.IndexStats` is changed
docs: A comment for enum value `EMBEDDING_SIZE_MISMATCH` in enum `RecordErrorType` is changed
docs: A comment for field `distance` in message `.google.cloud.aiplatform.v1beta1.FindNeighborsResponse` is changed
docs: A comment for field `gcs_notebook_source` in message `.google.cloud.aiplatform.v1beta1.NotebookExecutionJob` is changed
docs: A comment for field `gcs_output_uri` in message `.google.cloud.aiplatform.v1beta1.NotebookExecutionJob` is changed
docs: A comment for field `name` in message `.google.cloud.aiplatform.v1beta1.NotebookRuntimeTemplate` is changed
docs: A comment for field `rag_corpora` in message `.google.cloud.aiplatform.v1beta1.VertexRagStore` is changed
docs: A comment for field `gcs_source` in message `.google.cloud.aiplatform.v1beta1.RagFile` is changed
docs: A comment for field `rag_corpora` in message `.google.cloud.aiplatform.v1beta1.RetrieveContextsRequest` is changed

PiperOrigin-RevId: 629842300

Source-Link: googleapis/googleapis@f86c175

Source-Link: googleapis/googleapis-gen@281af7a
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjgxYWY3YTQ4NWJmZGQyZTllYjI4MGNkODhmOGQ2NjBhNjEzNTc4MSJ9

feat: A new value `TPU_V5_LITEPOD` is added to enum `AcceleratorType`
feat: A new field `search_entry_point` is added to message `.google.cloud.aiplatform.v1.GroundingMetadata`
feat: A new message `SearchEntryPoint` is added
feat: A new field `private_service_connect_config` is added to message `.google.cloud.aiplatform.v1.Endpoint`
feat: A new value `INVALID_TOKEN_VALUE` is added to enum `RecordErrorType`
feat: A new field `deploy_task_name` is added to message `.google.cloud.aiplatform.v1.PublisherModel`
docs: A comment for field `parent` in message `.google.cloud.aiplatform.v1.CreateFeatureGroupRequest` is changed
docs: A comment for field `name` in message `.google.cloud.aiplatform.v1.NotebookRuntimeTemplate` is changed
docs: A comment for field `base_model` in message `.google.cloud.aiplatform.v1.TuningJob` is changed
docs: A comment for field `tuned_model_display_name` in message `.google.cloud.aiplatform.v1.TuningJob` is changed
docs: A comment for field `epoch_count` in message `.google.cloud.aiplatform.v1.SupervisedHyperParameters` is changed
docs: A comment for field `learning_rate_multiplier` in message `.google.cloud.aiplatform.v1.SupervisedHyperParameters` is changed
docs: A comment for field `training_dataset_uri` in message `.google.cloud.aiplatform.v1.SupervisedTuningSpec` is changed
docs: A comment for field `validation_dataset_uri` in message `.google.cloud.aiplatform.v1.SupervisedTuningSpec` is changed

PiperOrigin-RevId: 629522152

Source-Link: googleapis/googleapis@f9767ca

Source-Link: googleapis/googleapis-gen@95e3cf4
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiOTVlM2NmNGE2NTE4MGU3YThlMjY4NTNhMDNjMzM1Yzc3YTk4ZDBjNSJ9

chore: Update gapic-generator-python to v1.17.1

PiperOrigin-RevId: 629071173

Source-Link: googleapis/googleapis@4afa392

Source-Link: googleapis/googleapis-gen@16dbbb4
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMTZkYmJiNGQwNDU3ZGI1ZTYxYWM5Zjk5YjBkNTJhNDYxNTQ0NTVhYyJ9

feat: add NotebookExecutionJob resource and APIs to public v1beta1 client library

PiperOrigin-RevId: 628125855

Source-Link: googleapis/googleapis@f41b4bc

Source-Link: googleapis/googleapis-gen@2d65169
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMmQ2NTE2OWFmNzM2NDQ4ZWI1YTY2NjQ2MTM0YzE0NDAxNTI3MTNhNyJ9

--
1505fe3 by Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>:

🦉 Updates from OwlBot post-processor

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

COPYBARA_INTEGRATE_REVIEW=#3673 from googleapis:owl-bot-copy 9d828e6
PiperOrigin-RevId: 630401530
  • Loading branch information
gcf-owl-bot[bot] authored and Copybara-Service committed May 3, 2024
1 parent 73c9a09 commit e8fe28d
Show file tree
Hide file tree
Showing 376 changed files with 107,380 additions and 16,757 deletions.
2 changes: 2 additions & 0 deletions google/cloud/aiplatform_v1/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@
from .types.content import Part
from .types.content import SafetyRating
from .types.content import SafetySetting
from .types.content import SearchEntryPoint
from .types.content import Segment
from .types.content import VideoMetadata
from .types.content import HarmCategory
Expand Down Expand Up @@ -1400,6 +1401,7 @@
"Schema",
"SearchDataItemsRequest",
"SearchDataItemsResponse",
"SearchEntryPoint",
"SearchFeaturesRequest",
"SearchFeaturesResponse",
"SearchMigratableResourcesRequest",
Expand Down
315 changes: 169 additions & 146 deletions google/cloud/aiplatform_v1/services/dataset_service/async_client.py

Large diffs are not rendered by default.

200 changes: 88 additions & 112 deletions google/cloud/aiplatform_v1/services/dataset_service/client.py

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def __init__(
credentials: Optional[ga_credentials.Credentials] = None,
credentials_file: Optional[str] = None,
scopes: Optional[Sequence[str]] = None,
channel: Optional[grpc.Channel] = None,
channel: Optional[Union[grpc.Channel, Callable[..., grpc.Channel]]] = None,
api_mtls_endpoint: Optional[str] = None,
client_cert_source: Optional[Callable[[], Tuple[bytes, bytes]]] = None,
ssl_channel_credentials: Optional[grpc.ChannelCredentials] = None,
Expand All @@ -80,14 +80,17 @@ def __init__(
credentials identify the application to the service; if none
are specified, the client will attempt to ascertain the
credentials from the environment.
This argument is ignored if ``channel`` is provided.
This argument is ignored if a ``channel`` instance is provided.
credentials_file (Optional[str]): A file with credentials that can
be loaded with :func:`google.auth.load_credentials_from_file`.
This argument is ignored if ``channel`` is provided.
This argument is ignored if a ``channel`` instance is provided.
scopes (Optional(Sequence[str])): A list of scopes. This argument is
ignored if ``channel`` is provided.
channel (Optional[grpc.Channel]): A ``Channel`` instance through
which to make calls.
ignored if a ``channel`` instance is provided.
channel (Optional[Union[grpc.Channel, Callable[..., grpc.Channel]]]):
A ``Channel`` instance through which to make calls, or a Callable
that constructs and returns one. If set to None, ``self.create_channel``
is used to create the channel. If a Callable is given, it will be called
with the same arguments as used in ``self.create_channel``.
api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint.
If provided, it overrides the ``host`` argument and tries to create
a mutual TLS channel with client SSL credentials from
Expand All @@ -97,11 +100,11 @@ def __init__(
private key bytes, both in PEM format. It is ignored if
``api_mtls_endpoint`` is None.
ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials
for the grpc channel. It is ignored if ``channel`` is provided.
for the grpc channel. It is ignored if a ``channel`` instance is provided.
client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]):
A callback to provide client certificate bytes and private key bytes,
both in PEM format. It is used to configure a mutual TLS channel. It is
ignored if ``channel`` or ``ssl_channel_credentials`` is provided.
ignored if a ``channel`` instance or ``ssl_channel_credentials`` is provided.
quota_project_id (Optional[str]): An optional project to use for billing
and quota.
client_info (google.api_core.gapic_v1.client_info.ClientInfo):
Expand All @@ -128,7 +131,7 @@ def __init__(
if client_cert_source:
warnings.warn("client_cert_source is deprecated", DeprecationWarning)

if channel:
if isinstance(channel, grpc.Channel):
# Ignore credentials if a channel was passed.
credentials = False
# If a channel was explicitly provided, set it.
Expand Down Expand Up @@ -169,7 +172,9 @@ def __init__(
)

if not self._grpc_channel:
self._grpc_channel = type(self).create_channel(
# initialize with the provided callable or the default channel
channel_init = channel or type(self).create_channel
self._grpc_channel = channel_init(
self._host,
# use the credentials which are saved
credentials=self._credentials,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

from google.api_core import gapic_v1
from google.api_core import grpc_helpers_async
from google.api_core import exceptions as core_exceptions
from google.api_core import retry_async as retries
from google.api_core import operations_v1
from google.auth import credentials as ga_credentials # type: ignore
from google.auth.transport.grpc import SslCredentials # type: ignore
Expand Down Expand Up @@ -75,7 +77,6 @@ def create_channel(
the credentials from the environment.
credentials_file (Optional[str]): A file with credentials that can
be loaded with :func:`google.auth.load_credentials_from_file`.
This argument is ignored if ``channel`` is provided.
scopes (Optional[Sequence[str]]): A optional list of scopes needed for this
service. These are only used when credentials are not specified and
are passed to :func:`google.auth.default`.
Expand Down Expand Up @@ -105,7 +106,7 @@ def __init__(
credentials: Optional[ga_credentials.Credentials] = None,
credentials_file: Optional[str] = None,
scopes: Optional[Sequence[str]] = None,
channel: Optional[aio.Channel] = None,
channel: Optional[Union[aio.Channel, Callable[..., aio.Channel]]] = None,
api_mtls_endpoint: Optional[str] = None,
client_cert_source: Optional[Callable[[], Tuple[bytes, bytes]]] = None,
ssl_channel_credentials: Optional[grpc.ChannelCredentials] = None,
Expand All @@ -125,15 +126,18 @@ def __init__(
credentials identify the application to the service; if none
are specified, the client will attempt to ascertain the
credentials from the environment.
This argument is ignored if ``channel`` is provided.
This argument is ignored if a ``channel`` instance is provided.
credentials_file (Optional[str]): A file with credentials that can
be loaded with :func:`google.auth.load_credentials_from_file`.
This argument is ignored if ``channel`` is provided.
This argument is ignored if a ``channel`` instance is provided.
scopes (Optional[Sequence[str]]): A optional list of scopes needed for this
service. These are only used when credentials are not specified and
are passed to :func:`google.auth.default`.
channel (Optional[aio.Channel]): A ``Channel`` instance through
which to make calls.
channel (Optional[Union[aio.Channel, Callable[..., aio.Channel]]]):
A ``Channel`` instance through which to make calls, or a Callable
that constructs and returns one. If set to None, ``self.create_channel``
is used to create the channel. If a Callable is given, it will be called
with the same arguments as used in ``self.create_channel``.
api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint.
If provided, it overrides the ``host`` argument and tries to create
a mutual TLS channel with client SSL credentials from
Expand All @@ -143,11 +147,11 @@ def __init__(
private key bytes, both in PEM format. It is ignored if
``api_mtls_endpoint`` is None.
ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials
for the grpc channel. It is ignored if ``channel`` is provided.
for the grpc channel. It is ignored if a ``channel`` instance is provided.
client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]):
A callback to provide client certificate bytes and private key bytes,
both in PEM format. It is used to configure a mutual TLS channel. It is
ignored if ``channel`` or ``ssl_channel_credentials`` is provided.
ignored if a ``channel`` instance or ``ssl_channel_credentials`` is provided.
quota_project_id (Optional[str]): An optional project to use for billing
and quota.
client_info (google.api_core.gapic_v1.client_info.ClientInfo):
Expand All @@ -174,7 +178,7 @@ def __init__(
if client_cert_source:
warnings.warn("client_cert_source is deprecated", DeprecationWarning)

if channel:
if isinstance(channel, aio.Channel):
# Ignore credentials if a channel was passed.
credentials = False
# If a channel was explicitly provided, set it.
Expand Down Expand Up @@ -214,7 +218,9 @@ def __init__(
)

if not self._grpc_channel:
self._grpc_channel = type(self).create_channel(
# initialize with the provided callable or the default channel
channel_init = channel or type(self).create_channel
self._grpc_channel = channel_init(
self._host,
# use the credentials which are saved
credentials=self._credentials,
Expand Down Expand Up @@ -772,6 +778,101 @@ def list_annotations(
)
return self._stubs["list_annotations"]

def _prep_wrapped_messages(self, client_info):
"""Precompute the wrapped methods, overriding the base class method to use async wrappers."""
self._wrapped_methods = {
self.create_dataset: gapic_v1.method_async.wrap_method(
self.create_dataset,
default_timeout=None,
client_info=client_info,
),
self.get_dataset: gapic_v1.method_async.wrap_method(
self.get_dataset,
default_timeout=None,
client_info=client_info,
),
self.update_dataset: gapic_v1.method_async.wrap_method(
self.update_dataset,
default_timeout=None,
client_info=client_info,
),
self.list_datasets: gapic_v1.method_async.wrap_method(
self.list_datasets,
default_timeout=None,
client_info=client_info,
),
self.delete_dataset: gapic_v1.method_async.wrap_method(
self.delete_dataset,
default_timeout=None,
client_info=client_info,
),
self.import_data: gapic_v1.method_async.wrap_method(
self.import_data,
default_timeout=None,
client_info=client_info,
),
self.export_data: gapic_v1.method_async.wrap_method(
self.export_data,
default_timeout=None,
client_info=client_info,
),
self.create_dataset_version: gapic_v1.method_async.wrap_method(
self.create_dataset_version,
default_timeout=None,
client_info=client_info,
),
self.delete_dataset_version: gapic_v1.method_async.wrap_method(
self.delete_dataset_version,
default_timeout=None,
client_info=client_info,
),
self.get_dataset_version: gapic_v1.method_async.wrap_method(
self.get_dataset_version,
default_timeout=None,
client_info=client_info,
),
self.list_dataset_versions: gapic_v1.method_async.wrap_method(
self.list_dataset_versions,
default_timeout=None,
client_info=client_info,
),
self.restore_dataset_version: gapic_v1.method_async.wrap_method(
self.restore_dataset_version,
default_timeout=None,
client_info=client_info,
),
self.list_data_items: gapic_v1.method_async.wrap_method(
self.list_data_items,
default_timeout=None,
client_info=client_info,
),
self.search_data_items: gapic_v1.method_async.wrap_method(
self.search_data_items,
default_timeout=None,
client_info=client_info,
),
self.list_saved_queries: gapic_v1.method_async.wrap_method(
self.list_saved_queries,
default_timeout=None,
client_info=client_info,
),
self.delete_saved_query: gapic_v1.method_async.wrap_method(
self.delete_saved_query,
default_timeout=None,
client_info=client_info,
),
self.get_annotation_spec: gapic_v1.method_async.wrap_method(
self.get_annotation_spec,
default_timeout=None,
client_info=client_info,
),
self.list_annotations: gapic_v1.method_async.wrap_method(
self.list_annotations,
default_timeout=None,
client_info=client_info,
),
}

def close(self):
return self.grpc_channel.close()

Expand Down

0 comments on commit e8fe28d

Please sign in to comment.