Skip to content

Commit 1cda4b4

Browse files
feat: Add support for V1 and V2 classification models for the V1Beta2 API (#1680)
* feat: add timestamp_outside_retention_rows_count to ImportFeatureValuesResponse and ImportFeatureValuesOperationMetadata in aiplatform v1beta1 featurestore_service.proto feat: add RemoveContextChildren rpc to aiplatform v1beta1 metadata_service.proto feat: add order_by to ListArtifactsRequest, ListContextsRequest, and ListExecutionsRequest in aiplatform v1beta1 metadata_service.proto feat: add InputArtifact to RuntimeConfig in aiplatform v1beta1 pipeline_job.proto feat: add read_mask to ListPipelineJobsRequest in aiplatform v1beta1 pipeline_service.proto feat: add TransferLearningConfig in aiplatform v1beta1 study.proto PiperOrigin-RevId: 475580307 Source-Link: googleapis/googleapis@dbc83bd Source-Link: googleapis/googleapis-gen@26c1205 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMjZjMTIwNTk0ZDYwNDlkNDAwNjEwMjNjYWUzNDVkYTgwMTgxMDc3YyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: add timestamp_outside_retention_rows_count to ImportFeatureValuesResponse and ImportFeatureValuesOperationMetadata in aiplatform v1 featurestore_service.proto feat: add RemoveContextChildren rpc to aiplatform v1 metadata_service.proto feat: add order_by to ListArtifactsRequest, ListContextsRequest, and ListExecutionsRequest in aiplatform v1 metadata_service.proto PiperOrigin-RevId: 475580702 Source-Link: googleapis/googleapis@af65a19 Source-Link: googleapis/googleapis-gen@023d431 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMDIzZDQzMTU2OWE1M2Y5YjVjZDBkNDdjNmFmODViOGE0NmNlYTVlOCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: Add support for V1 and V2 classification models for the V1Beta2 API PiperOrigin-RevId: 475604619 Source-Link: googleapis/googleapis@044a15c Source-Link: googleapis/googleapis-gen@410020a Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNDEwMDIwYWY5MzRjNzI0OGY3ODA0NzcwZDZmOGVjNDU3MWJmYTU1MSJ9 * 🦉 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>
1 parent 9a506ee commit 1cda4b4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+2098
-36
lines changed

aiplatform-v1beta1-py.tar.gz

Whitespace-only changes.

google/cloud/aiplatform_v1/__init__.py

+4
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,8 @@
317317
from .types.metadata_service import QueryArtifactLineageSubgraphRequest
318318
from .types.metadata_service import QueryContextLineageSubgraphRequest
319319
from .types.metadata_service import QueryExecutionInputsAndOutputsRequest
320+
from .types.metadata_service import RemoveContextChildrenRequest
321+
from .types.metadata_service import RemoveContextChildrenResponse
320322
from .types.metadata_service import UpdateArtifactRequest
321323
from .types.metadata_service import UpdateContextRequest
322324
from .types.metadata_service import UpdateExecutionRequest
@@ -898,6 +900,8 @@
898900
"ReadTensorboardBlobDataResponse",
899901
"ReadTensorboardTimeSeriesDataRequest",
900902
"ReadTensorboardTimeSeriesDataResponse",
903+
"RemoveContextChildrenRequest",
904+
"RemoveContextChildrenResponse",
901905
"RemoveDatapointsRequest",
902906
"RemoveDatapointsResponse",
903907
"ResourcesConsumed",

google/cloud/aiplatform_v1/gapic_metadata.json

+10
Original file line numberDiff line numberDiff line change
@@ -1078,6 +1078,11 @@
10781078
"query_execution_inputs_and_outputs"
10791079
]
10801080
},
1081+
"RemoveContextChildren": {
1082+
"methods": [
1083+
"remove_context_children"
1084+
]
1085+
},
10811086
"UpdateArtifact": {
10821087
"methods": [
10831088
"update_artifact"
@@ -1238,6 +1243,11 @@
12381243
"query_execution_inputs_and_outputs"
12391244
]
12401245
},
1246+
"RemoveContextChildren": {
1247+
"methods": [
1248+
"remove_context_children"
1249+
]
1250+
},
12411251
"UpdateArtifact": {
12421252
"methods": [
12431253
"update_artifact"

google/cloud/aiplatform_v1/services/metadata_service/async_client.py

+116
Original file line numberDiff line numberDiff line change
@@ -2392,6 +2392,122 @@ async def sample_add_context_children():
23922392
# Done; return the response.
23932393
return response
23942394

2395+
async def remove_context_children(
2396+
self,
2397+
request: Union[metadata_service.RemoveContextChildrenRequest, dict] = None,
2398+
*,
2399+
context: str = None,
2400+
child_contexts: Sequence[str] = None,
2401+
retry: OptionalRetry = gapic_v1.method.DEFAULT,
2402+
timeout: float = None,
2403+
metadata: Sequence[Tuple[str, str]] = (),
2404+
) -> metadata_service.RemoveContextChildrenResponse:
2405+
r"""Remove a set of children contexts from a parent
2406+
Context. If any of the child Contexts were NOT added to
2407+
the parent Context, they are simply skipped.
2408+
2409+
.. code-block:: python
2410+
2411+
# This snippet has been automatically generated and should be regarded as a
2412+
# code template only.
2413+
# It will require modifications to work:
2414+
# - It may require correct/in-range values for request initialization.
2415+
# - It may require specifying regional endpoints when creating the service
2416+
# client as shown in:
2417+
# https://googleapis.dev/python/google-api-core/latest/client_options.html
2418+
from google.cloud import aiplatform_v1
2419+
2420+
async def sample_remove_context_children():
2421+
# Create a client
2422+
client = aiplatform_v1.MetadataServiceAsyncClient()
2423+
2424+
# Initialize request argument(s)
2425+
request = aiplatform_v1.RemoveContextChildrenRequest(
2426+
context="context_value",
2427+
)
2428+
2429+
# Make the request
2430+
response = await client.remove_context_children(request=request)
2431+
2432+
# Handle the response
2433+
print(response)
2434+
2435+
Args:
2436+
request (Union[google.cloud.aiplatform_v1.types.RemoveContextChildrenRequest, dict]):
2437+
The request object. Request message for
2438+
[MetadataService.DeleteContextChildrenRequest][].
2439+
context (:class:`str`):
2440+
Required. The resource name of the parent Context.
2441+
2442+
Format:
2443+
``projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}``
2444+
2445+
This corresponds to the ``context`` field
2446+
on the ``request`` instance; if ``request`` is provided, this
2447+
should not be set.
2448+
child_contexts (:class:`Sequence[str]`):
2449+
The resource names of the child
2450+
Contexts.
2451+
2452+
This corresponds to the ``child_contexts`` field
2453+
on the ``request`` instance; if ``request`` is provided, this
2454+
should not be set.
2455+
retry (google.api_core.retry.Retry): Designation of what errors, if any,
2456+
should be retried.
2457+
timeout (float): The timeout for this request.
2458+
metadata (Sequence[Tuple[str, str]]): Strings which should be
2459+
sent along with the request as metadata.
2460+
2461+
Returns:
2462+
google.cloud.aiplatform_v1.types.RemoveContextChildrenResponse:
2463+
Response message for
2464+
[MetadataService.RemoveContextChildren][google.cloud.aiplatform.v1.MetadataService.RemoveContextChildren].
2465+
2466+
"""
2467+
# Create or coerce a protobuf request object.
2468+
# Quick check: If we got a request object, we should *not* have
2469+
# gotten any keyword arguments that map to the request.
2470+
has_flattened_params = any([context, child_contexts])
2471+
if request is not None and has_flattened_params:
2472+
raise ValueError(
2473+
"If the `request` argument is set, then none of "
2474+
"the individual field arguments should be set."
2475+
)
2476+
2477+
request = metadata_service.RemoveContextChildrenRequest(request)
2478+
2479+
# If we have keyword arguments corresponding to fields on the
2480+
# request, apply these.
2481+
if context is not None:
2482+
request.context = context
2483+
if child_contexts:
2484+
request.child_contexts.extend(child_contexts)
2485+
2486+
# Wrap the RPC method; this adds retry and timeout information,
2487+
# and friendly error handling.
2488+
rpc = gapic_v1.method_async.wrap_method(
2489+
self._client._transport.remove_context_children,
2490+
default_timeout=None,
2491+
client_info=DEFAULT_CLIENT_INFO,
2492+
)
2493+
2494+
# Certain fields should be provided within the metadata header;
2495+
# add these here.
2496+
metadata = tuple(metadata) + (
2497+
gapic_v1.routing_header.to_grpc_metadata((("context", request.context),)),
2498+
)
2499+
2500+
# Send the request.
2501+
response = await rpc(
2502+
request,
2503+
retry=retry,
2504+
timeout=timeout,
2505+
metadata=metadata,
2506+
)
2507+
2508+
# Done; return the response.
2509+
return response
2510+
23952511
async def query_context_lineage_subgraph(
23962512
self,
23972513
request: Union[

google/cloud/aiplatform_v1/services/metadata_service/client.py

+116
Original file line numberDiff line numberDiff line change
@@ -2705,6 +2705,122 @@ def sample_add_context_children():
27052705
# Done; return the response.
27062706
return response
27072707

2708+
def remove_context_children(
2709+
self,
2710+
request: Union[metadata_service.RemoveContextChildrenRequest, dict] = None,
2711+
*,
2712+
context: str = None,
2713+
child_contexts: Sequence[str] = None,
2714+
retry: OptionalRetry = gapic_v1.method.DEFAULT,
2715+
timeout: float = None,
2716+
metadata: Sequence[Tuple[str, str]] = (),
2717+
) -> metadata_service.RemoveContextChildrenResponse:
2718+
r"""Remove a set of children contexts from a parent
2719+
Context. If any of the child Contexts were NOT added to
2720+
the parent Context, they are simply skipped.
2721+
2722+
.. code-block:: python
2723+
2724+
# This snippet has been automatically generated and should be regarded as a
2725+
# code template only.
2726+
# It will require modifications to work:
2727+
# - It may require correct/in-range values for request initialization.
2728+
# - It may require specifying regional endpoints when creating the service
2729+
# client as shown in:
2730+
# https://googleapis.dev/python/google-api-core/latest/client_options.html
2731+
from google.cloud import aiplatform_v1
2732+
2733+
def sample_remove_context_children():
2734+
# Create a client
2735+
client = aiplatform_v1.MetadataServiceClient()
2736+
2737+
# Initialize request argument(s)
2738+
request = aiplatform_v1.RemoveContextChildrenRequest(
2739+
context="context_value",
2740+
)
2741+
2742+
# Make the request
2743+
response = client.remove_context_children(request=request)
2744+
2745+
# Handle the response
2746+
print(response)
2747+
2748+
Args:
2749+
request (Union[google.cloud.aiplatform_v1.types.RemoveContextChildrenRequest, dict]):
2750+
The request object. Request message for
2751+
[MetadataService.DeleteContextChildrenRequest][].
2752+
context (str):
2753+
Required. The resource name of the parent Context.
2754+
2755+
Format:
2756+
``projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}``
2757+
2758+
This corresponds to the ``context`` field
2759+
on the ``request`` instance; if ``request`` is provided, this
2760+
should not be set.
2761+
child_contexts (Sequence[str]):
2762+
The resource names of the child
2763+
Contexts.
2764+
2765+
This corresponds to the ``child_contexts`` field
2766+
on the ``request`` instance; if ``request`` is provided, this
2767+
should not be set.
2768+
retry (google.api_core.retry.Retry): Designation of what errors, if any,
2769+
should be retried.
2770+
timeout (float): The timeout for this request.
2771+
metadata (Sequence[Tuple[str, str]]): Strings which should be
2772+
sent along with the request as metadata.
2773+
2774+
Returns:
2775+
google.cloud.aiplatform_v1.types.RemoveContextChildrenResponse:
2776+
Response message for
2777+
[MetadataService.RemoveContextChildren][google.cloud.aiplatform.v1.MetadataService.RemoveContextChildren].
2778+
2779+
"""
2780+
# Create or coerce a protobuf request object.
2781+
# Quick check: If we got a request object, we should *not* have
2782+
# gotten any keyword arguments that map to the request.
2783+
has_flattened_params = any([context, child_contexts])
2784+
if request is not None and has_flattened_params:
2785+
raise ValueError(
2786+
"If the `request` argument is set, then none of "
2787+
"the individual field arguments should be set."
2788+
)
2789+
2790+
# Minor optimization to avoid making a copy if the user passes
2791+
# in a metadata_service.RemoveContextChildrenRequest.
2792+
# There's no risk of modifying the input as we've already verified
2793+
# there are no flattened fields.
2794+
if not isinstance(request, metadata_service.RemoveContextChildrenRequest):
2795+
request = metadata_service.RemoveContextChildrenRequest(request)
2796+
# If we have keyword arguments corresponding to fields on the
2797+
# request, apply these.
2798+
if context is not None:
2799+
request.context = context
2800+
if child_contexts is not None:
2801+
request.child_contexts = child_contexts
2802+
2803+
# Wrap the RPC method; this adds retry and timeout information,
2804+
# and friendly error handling.
2805+
rpc = self._transport._wrapped_methods[self._transport.remove_context_children]
2806+
2807+
# Certain fields should be provided within the metadata header;
2808+
# add these here.
2809+
metadata = tuple(metadata) + (
2810+
gapic_v1.routing_header.to_grpc_metadata((("context", request.context),)),
2811+
)
2812+
2813+
# Send the request.
2814+
response = rpc(
2815+
request,
2816+
retry=retry,
2817+
timeout=timeout,
2818+
metadata=metadata,
2819+
)
2820+
2821+
# Done; return the response.
2822+
return response
2823+
27082824
def query_context_lineage_subgraph(
27092825
self,
27102826
request: Union[

google/cloud/aiplatform_v1/services/metadata_service/transports/base.py

+17
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,11 @@ def _prep_wrapped_messages(self, client_info):
233233
default_timeout=None,
234234
client_info=client_info,
235235
),
236+
self.remove_context_children: gapic_v1.method.wrap_method(
237+
self.remove_context_children,
238+
default_timeout=None,
239+
client_info=client_info,
240+
),
236241
self.query_context_lineage_subgraph: gapic_v1.method.wrap_method(
237242
self.query_context_lineage_subgraph,
238243
default_timeout=None,
@@ -491,6 +496,18 @@ def add_context_children(
491496
]:
492497
raise NotImplementedError()
493498

499+
@property
500+
def remove_context_children(
501+
self,
502+
) -> Callable[
503+
[metadata_service.RemoveContextChildrenRequest],
504+
Union[
505+
metadata_service.RemoveContextChildrenResponse,
506+
Awaitable[metadata_service.RemoveContextChildrenResponse],
507+
],
508+
]:
509+
raise NotImplementedError()
510+
494511
@property
495512
def query_context_lineage_subgraph(
496513
self,

google/cloud/aiplatform_v1/services/metadata_service/transports/grpc.py

+31
Original file line numberDiff line numberDiff line change
@@ -758,6 +758,37 @@ def add_context_children(
758758
)
759759
return self._stubs["add_context_children"]
760760

761+
@property
762+
def remove_context_children(
763+
self,
764+
) -> Callable[
765+
[metadata_service.RemoveContextChildrenRequest],
766+
metadata_service.RemoveContextChildrenResponse,
767+
]:
768+
r"""Return a callable for the remove context children method over gRPC.
769+
770+
Remove a set of children contexts from a parent
771+
Context. If any of the child Contexts were NOT added to
772+
the parent Context, they are simply skipped.
773+
774+
Returns:
775+
Callable[[~.RemoveContextChildrenRequest],
776+
~.RemoveContextChildrenResponse]:
777+
A function that, when called, will call the underlying RPC
778+
on the server.
779+
"""
780+
# Generate a "stub function" on-the-fly which will actually make
781+
# the request.
782+
# gRPC handles serialization and deserialization, so we just need
783+
# to pass in the functions for each.
784+
if "remove_context_children" not in self._stubs:
785+
self._stubs["remove_context_children"] = self.grpc_channel.unary_unary(
786+
"/google.cloud.aiplatform.v1.MetadataService/RemoveContextChildren",
787+
request_serializer=metadata_service.RemoveContextChildrenRequest.serialize,
788+
response_deserializer=metadata_service.RemoveContextChildrenResponse.deserialize,
789+
)
790+
return self._stubs["remove_context_children"]
791+
761792
@property
762793
def query_context_lineage_subgraph(
763794
self,

google/cloud/aiplatform_v1/services/metadata_service/transports/grpc_asyncio.py

+31
Original file line numberDiff line numberDiff line change
@@ -784,6 +784,37 @@ def add_context_children(
784784
)
785785
return self._stubs["add_context_children"]
786786

787+
@property
788+
def remove_context_children(
789+
self,
790+
) -> Callable[
791+
[metadata_service.RemoveContextChildrenRequest],
792+
Awaitable[metadata_service.RemoveContextChildrenResponse],
793+
]:
794+
r"""Return a callable for the remove context children method over gRPC.
795+
796+
Remove a set of children contexts from a parent
797+
Context. If any of the child Contexts were NOT added to
798+
the parent Context, they are simply skipped.
799+
800+
Returns:
801+
Callable[[~.RemoveContextChildrenRequest],
802+
Awaitable[~.RemoveContextChildrenResponse]]:
803+
A function that, when called, will call the underlying RPC
804+
on the server.
805+
"""
806+
# Generate a "stub function" on-the-fly which will actually make
807+
# the request.
808+
# gRPC handles serialization and deserialization, so we just need
809+
# to pass in the functions for each.
810+
if "remove_context_children" not in self._stubs:
811+
self._stubs["remove_context_children"] = self.grpc_channel.unary_unary(
812+
"/google.cloud.aiplatform.v1.MetadataService/RemoveContextChildren",
813+
request_serializer=metadata_service.RemoveContextChildrenRequest.serialize,
814+
response_deserializer=metadata_service.RemoveContextChildrenResponse.deserialize,
815+
)
816+
return self._stubs["remove_context_children"]
817+
787818
@property
788819
def query_context_lineage_subgraph(
789820
self,

0 commit comments

Comments
 (0)