Content-Length: 1177417 | pFad | https://github.com/googleapis/python-aiplatform/commit/f0812e3983df66ca4b53add8f8a8e9a4a9a7699a

DD Copybara import of the project: · googleapis/python-aiplatform@f0812e3 · GitHub
Skip to content

Commit f0812e3

Browse files
gcf-owl-bot[bot]copybara-github
authored andcommitted
Copybara import of the project:
-- 880e7bf by Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>: feat: add VertexAISearch.max_results, filter, data_store_specs options PiperOrigin-RevId: 760783731 Source-Link: googleapis/googleapis@7d43527 Source-Link: googleapis/googleapis-gen@c1a7975 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYzFhNzk3NTYxMjBiMjkwMzhkYzA0NWM3NWRlODBiMzFhN2U3OWNmMiJ9 feat: add VertexAISearch.max_results, filter, data_store_specs options PiperOrigin-RevId: 760782195 Source-Link: googleapis/googleapis@a3ca33f Source-Link: googleapis/googleapis-gen@5870846 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNTg3MDg0NmJmNDYyN2Q5YWZkMjU2NWM4NDg0Y2QzYmRiN2U1ZmQ2MyJ9 feat: adding thoughts_token_count to v1beta1 client library PiperOrigin-RevId: 759721742 Source-Link: googleapis/googleapis@b52db30 Source-Link: googleapis/googleapis-gen@b59aaf8 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjU5YWFmODY4MmFmMTRjMzRlMTNhM2JmMjFhZDMzZmQ3MjZiZDM3OCJ9 feat: adding thoughts_token_count to prediction service PiperOrigin-RevId: 759720969 Source-Link: googleapis/googleapis@f7cd2cb Source-Link: googleapis/googleapis-gen@de213f4 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZGUyMTNmNGNhMWI0N2JiNGM3MWU5ZTZjNTM1YmY2MGVhYjY3MzM1ZiJ9 chore(deps): Update Protobuf 25 to the latest version (25.7) PiperOrigin-RevId: 759678194 Source-Link: googleapis/googleapis@8e6832c Source-Link: googleapis/googleapis-gen@d74facf Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZDc0ZmFjZmVjZjcxMmQ1ZThmZDM4OWQwZmI1ZTU5ZmRjYjNmNjU1ZiJ9 feat: add encryption_spec to Model Monitoring public preview API PiperOrigin-RevId: 759653857 Source-Link: googleapis/googleapis@71a251e Source-Link: googleapis/googleapis-gen@5d6ad3c Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNWQ2YWQzYzk1MzNiODUwNTYxZjA1YTg5ZDM4NDQ0ZmZiYTE3M2MzMCJ9 feat: Add checkpoint ID to endpoint proto PiperOrigin-RevId: 758683684 Source-Link: googleapis/googleapis@64bf7d5 Source-Link: googleapis/googleapis-gen@f98310b Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZjk4MzEwYjg4N2I3ZDMxNGQ2NjE1NzQ3MGQxYWRjNjQwNWRhMWQ1MiJ9 feat: Add checkpoint ID to endpoint proto PiperOrigin-RevId: 758660257 Source-Link: googleapis/googleapis@8a24e98 Source-Link: googleapis/googleapis-gen@67a7ce6 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNjdhN2NlNjkwODc0ODYxMzM3YTAxNjU0NGY2NzBlNzNiMmQ3Y2QxNyJ9 -- dc18cff 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=#5321 from googleapis:owl-bot-copy dc18cff PiperOrigin-RevId: 761540509
1 parent 49c0bf5 commit f0812e3

18 files changed

+222
-24
lines changed

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -243,40 +243,40 @@ def parse_annotated_dataset_path(path: str) -> Dict[str, str]:
243243
@staticmethod
244244
def dataset_path(
245245
project: str,
246+
location: str,
246247
dataset: str,
247248
) -> str:
248249
"""Returns a fully-qualified dataset string."""
249-
return "projects/{project}/datasets/{dataset}".format(
250+
return "projects/{project}/locations/{location}/datasets/{dataset}".format(
250251
project=project,
252+
location=location,
251253
dataset=dataset,
252254
)
253255

254256
@staticmethod
255257
def parse_dataset_path(path: str) -> Dict[str, str]:
256258
"""Parses a dataset path into its component segments."""
257-
m = re.match(r"^projects/(?P<project>.+?)/datasets/(?P<dataset>.+?)$", path)
259+
m = re.match(
260+
r"^projects/(?P<project>.+?)/locations/(?P<location>.+?)/datasets/(?P<dataset>.+?)$",
261+
path,
262+
)
258263
return m.groupdict() if m else {}
259264

260265
@staticmethod
261266
def dataset_path(
262267
project: str,
263-
location: str,
264268
dataset: str,
265269
) -> str:
266270
"""Returns a fully-qualified dataset string."""
267-
return "projects/{project}/locations/{location}/datasets/{dataset}".format(
271+
return "projects/{project}/datasets/{dataset}".format(
268272
project=project,
269-
location=location,
270273
dataset=dataset,
271274
)
272275

273276
@staticmethod
274277
def parse_dataset_path(path: str) -> Dict[str, str]:
275278
"""Parses a dataset path into its component segments."""
276-
m = re.match(
277-
r"^projects/(?P<project>.+?)/locations/(?P<location>.+?)/datasets/(?P<dataset>.+?)$",
278-
path,
279-
)
279+
m = re.match(r"^projects/(?P<project>.+?)/datasets/(?P<dataset>.+?)$", path)
280280
return m.groupdict() if m else {}
281281

282282
@staticmethod

google/cloud/aiplatform_v1/types/endpoint.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,8 @@ class DeployedModel(proto.Message):
386386
System labels to apply to Model Garden
387387
deployments. System labels are managed by Google
388388
for internal use only.
389+
checkpoint_id (str):
390+
The checkpoint id of the model.
389391
speculative_decoding_spec (google.cloud.aiplatform_v1.types.SpeculativeDecodingSpec):
390392
Optional. Spec for configuring speculative
391393
decoding.
@@ -499,6 +501,10 @@ class Status(proto.Message):
499501
proto.STRING,
500502
number=28,
501503
)
504+
checkpoint_id: str = proto.Field(
505+
proto.STRING,
506+
number=29,
507+
)
502508
speculative_decoding_spec: "SpeculativeDecodingSpec" = proto.Field(
503509
proto.MESSAGE,
504510
number=30,

google/cloud/aiplatform_v1/types/prediction_service.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -982,6 +982,9 @@ class UsageMetadata(proto.Message):
982982
this includes the number of tokens in the cached content.
983983
candidates_token_count (int):
984984
Number of tokens in the response(s).
985+
thoughts_token_count (int):
986+
Output only. Number of tokens present in
987+
thoughts output.
985988
total_token_count (int):
986989
Total token count for prompt and response
987990
candidates.
@@ -1007,6 +1010,10 @@ class UsageMetadata(proto.Message):
10071010
proto.INT32,
10081011
number=2,
10091012
)
1013+
thoughts_token_count: int = proto.Field(
1014+
proto.INT32,
1015+
number=14,
1016+
)
10101017
total_token_count: int = proto.Field(
10111018
proto.INT32,
10121019
number=3,

google/cloud/aiplatform_v1/types/tool.py

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,8 +483,48 @@ class VertexAISearch(proto.Message):
483483
Optional. Fully-qualified Vertex AI Search engine resource
484484
ID. Format:
485485
``projects/{project}/locations/{location}/collections/{collection}/engines/{engine}``
486+
max_results (int):
487+
Optional. Number of search results to return
488+
per query. The default value is 10.
489+
The maximumm allowed value is 10.
490+
filter (str):
491+
Optional. Filter strings to be passed to the
492+
search API.
493+
data_store_specs (MutableSequence[google.cloud.aiplatform_v1.types.VertexAISearch.DataStoreSpec]):
494+
Specifications that define the specific
495+
DataStores to be searched, along with
496+
configurations for those data stores. This is
497+
only considered for Engines with multiple data
498+
stores.
499+
It should only be set if engine is used.
486500
"""
487501

502+
class DataStoreSpec(proto.Message):
503+
r"""Define data stores within engine to filter on in a search
504+
call and configurations for those data stores. For more
505+
information, see
506+
https://cloud.google.com/generative-ai-app-builder/docs/reference/rpc/google.cloud.discoveryengine.v1#datastorespec
507+
508+
Attributes:
509+
data_store (str):
510+
Full resource name of DataStore, such as Format:
511+
``projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}``
512+
filter (str):
513+
Optional. Filter specification to filter documents in the
514+
data store specified by data_store field. For more
515+
information on filtering, see
516+
`Filtering <https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata>`__
517+
"""
518+
519+
data_store: str = proto.Field(
520+
proto.STRING,
521+
number=1,
522+
)
523+
filter: str = proto.Field(
524+
proto.STRING,
525+
number=2,
526+
)
527+
488528
datastore: str = proto.Field(
489529
proto.STRING,
490530
number=1,
@@ -493,6 +533,19 @@ class VertexAISearch(proto.Message):
493533
proto.STRING,
494534
number=2,
495535
)
536+
max_results: int = proto.Field(
537+
proto.INT32,
538+
number=3,
539+
)
540+
filter: str = proto.Field(
541+
proto.STRING,
542+
number=4,
543+
)
544+
data_store_specs: MutableSequence[DataStoreSpec] = proto.RepeatedField(
545+
proto.MESSAGE,
546+
number=5,
547+
message=DataStoreSpec,
548+
)
496549

497550

498551
class GoogleSearchRetrieval(proto.Message):

google/cloud/aiplatform_v1beta1/services/model_monitoring_service/async_client.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
from google.api_core import operation as gac_operation # type: ignore
4949
from google.api_core import operation_async # type: ignore
5050
from google.cloud.aiplatform_v1beta1.services.model_monitoring_service import pagers
51+
from google.cloud.aiplatform_v1beta1.types import encryption_spec
5152
from google.cloud.aiplatform_v1beta1.types import explanation
5253
from google.cloud.aiplatform_v1beta1.types import job_state
5354
from google.cloud.aiplatform_v1beta1.types import model_monitor

google/cloud/aiplatform_v1beta1/services/model_monitoring_service/client.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
from google.api_core import operation as gac_operation # type: ignore
6565
from google.api_core import operation_async # type: ignore
6666
from google.cloud.aiplatform_v1beta1.services.model_monitoring_service import pagers
67+
from google.cloud.aiplatform_v1beta1.types import encryption_spec
6768
from google.cloud.aiplatform_v1beta1.types import explanation
6869
from google.cloud.aiplatform_v1beta1.types import job_state
6970
from google.cloud.aiplatform_v1beta1.types import model_monitor

google/cloud/aiplatform_v1beta1/types/endpoint.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,8 @@ class DeployedModel(proto.Message):
388388
System labels to apply to Model Garden
389389
deployments. System labels are managed by Google
390390
for internal use only.
391+
checkpoint_id (str):
392+
The checkpoint id of the model.
391393
"""
392394

393395
class Status(proto.Message):
@@ -503,6 +505,10 @@ class Status(proto.Message):
503505
proto.STRING,
504506
number=28,
505507
)
508+
checkpoint_id: str = proto.Field(
509+
proto.STRING,
510+
number=29,
511+
)
506512

507513

508514
class PrivateEndpoints(proto.Message):

google/cloud/aiplatform_v1beta1/types/model_monitor.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
import proto # type: ignore
2121

22+
from google.cloud.aiplatform_v1beta1.types import encryption_spec as gca_encryption_spec
2223
from google.cloud.aiplatform_v1beta1.types import explanation
2324
from google.cloud.aiplatform_v1beta1.types import model_monitoring_spec
2425
from google.protobuf import timestamp_pb2 # type: ignore
@@ -90,6 +91,11 @@ class ModelMonitor(proto.Message):
9091
It is required for most models, but optional for
9192
Vertex AI AutoML Tables unless the schem
9293
information is not available.
94+
encryption_spec (google.cloud.aiplatform_v1beta1.types.EncryptionSpec):
95+
Customer-managed encryption key spec for a
96+
ModelMonitor. If set, this ModelMonitor and all
97+
sub-resources of this ModelMonitor will be
98+
secured by this key.
9399
create_time (google.protobuf.timestamp_pb2.Timestamp):
94100
Output only. Timestamp when this ModelMonitor
95101
was created.
@@ -192,6 +198,11 @@ class VertexModelSource(proto.Message):
192198
number=9,
193199
message="ModelMonitoringSchema",
194200
)
201+
encryption_spec: gca_encryption_spec.EncryptionSpec = proto.Field(
202+
proto.MESSAGE,
203+
number=5,
204+
message=gca_encryption_spec.EncryptionSpec,
205+
)
195206
create_time: timestamp_pb2.Timestamp = proto.Field(
196207
proto.MESSAGE,
197208
number=6,

google/cloud/aiplatform_v1beta1/types/prediction_service.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1039,6 +1039,9 @@ class UsageMetadata(proto.Message):
10391039
this includes the number of tokens in the cached content.
10401040
candidates_token_count (int):
10411041
Number of tokens in the response(s).
1042+
thoughts_token_count (int):
1043+
Output only. Number of tokens present in
1044+
thoughts output.
10421045
total_token_count (int):
10431046
Total token count for prompt and response
10441047
candidates.
@@ -1064,6 +1067,10 @@ class UsageMetadata(proto.Message):
10641067
proto.INT32,
10651068
number=2,
10661069
)
1070+
thoughts_token_count: int = proto.Field(
1071+
proto.INT32,
1072+
number=14,
1073+
)
10671074
total_token_count: int = proto.Field(
10681075
proto.INT32,
10691076
number=3,

google/cloud/aiplatform_v1beta1/types/tool.py

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -594,8 +594,48 @@ class VertexAISearch(proto.Message):
594594
Optional. Fully-qualified Vertex AI Search engine resource
595595
ID. Format:
596596
``projects/{project}/locations/{location}/collections/{collection}/engines/{engine}``
597+
max_results (int):
598+
Optional. Number of search results to return
599+
per query. The default value is 10.
600+
The maximumm allowed value is 10.
601+
filter (str):
602+
Optional. Filter strings to be passed to the
603+
search API.
604+
data_store_specs (MutableSequence[google.cloud.aiplatform_v1beta1.types.VertexAISearch.DataStoreSpec]):
605+
Specifications that define the specific
606+
DataStores to be searched, along with
607+
configurations for those data stores. This is
608+
only considered for Engines with multiple data
609+
stores.
610+
It should only be set if engine is used.
597611
"""
598612

613+
class DataStoreSpec(proto.Message):
614+
r"""Define data stores within engine to filter on in a search
615+
call and configurations for those data stores. For more
616+
information, see
617+
https://cloud.google.com/generative-ai-app-builder/docs/reference/rpc/google.cloud.discoveryengine.v1#datastorespec
618+
619+
Attributes:
620+
data_store (str):
621+
Full resource name of DataStore, such as Format:
622+
``projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}``
623+
filter (str):
624+
Optional. Filter specification to filter documents in the
625+
data store specified by data_store field. For more
626+
information on filtering, see
627+
`Filtering <https://cloud.google.com/generative-ai-app-builder/docs/filter-search-metadata>`__
628+
"""
629+
630+
data_store: str = proto.Field(
631+
proto.STRING,
632+
number=1,
633+
)
634+
filter: str = proto.Field(
635+
proto.STRING,
636+
number=2,
637+
)
638+
599639
datastore: str = proto.Field(
600640
proto.STRING,
601641
number=1,
@@ -604,6 +644,19 @@ class VertexAISearch(proto.Message):
604644
proto.STRING,
605645
number=2,
606646
)
647+
max_results: int = proto.Field(
648+
proto.INT32,
649+
number=3,
650+
)
651+
filter: str = proto.Field(
652+
proto.STRING,
653+
number=4,
654+
)
655+
data_store_specs: MutableSequence[DataStoreSpec] = proto.RepeatedField(
656+
proto.MESSAGE,
657+
number=5,
658+
message=DataStoreSpec,
659+
)
607660

608661

609662
class GoogleSearchRetrieval(proto.Message):

samples/generated_samples/snippet_metadata_google.cloud.aiplatform.v1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"language": "PYTHON",
1010
"name": "google-cloud-aiplatform",
11-
"version": "1.93.1"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

samples/generated_samples/snippet_metadata_google.cloud.aiplatform.v1beta1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"language": "PYTHON",
1010
"name": "google-cloud-aiplatform",
11-
"version": "1.93.1"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

tests/unit/gapic/aiplatform_v1/test_endpoint_service.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7090,6 +7090,7 @@ def test_create_endpoint_rest_call_success(request_type):
70907090
"available_replica_count": 2408,
70917091
},
70927092
"system_labels": {},
7093+
"checkpoint_id": "checkpoint_id_value",
70937094
"speculative_decoding_spec": {
70947095
"draft_model_speculation": {"draft_model": "draft_model_value"},
70957096
"ngram_speculation": {"ngram_size": 1071},
@@ -7703,6 +7704,7 @@ def test_update_endpoint_rest_call_success(request_type):
77037704
"available_replica_count": 2408,
77047705
},
77057706
"system_labels": {},
7707+
"checkpoint_id": "checkpoint_id_value",
77067708
"speculative_decoding_spec": {
77077709
"draft_model_speculation": {"draft_model": "draft_model_value"},
77087710
"ngram_speculation": {"ngram_size": 1071},
@@ -9531,6 +9533,7 @@ async def test_create_endpoint_rest_asyncio_call_success(request_type):
95319533
"available_replica_count": 2408,
95329534
},
95339535
"system_labels": {},
9536+
"checkpoint_id": "checkpoint_id_value",
95349537
"speculative_decoding_spec": {
95359538
"draft_model_speculation": {"draft_model": "draft_model_value"},
95369539
"ngram_speculation": {"ngram_size": 1071},
@@ -10195,6 +10198,7 @@ async def test_update_endpoint_rest_asyncio_call_success(request_type):
1019510198
"available_replica_count": 2408,
1019610199
},
1019710200
"system_labels": {},
10201+
"checkpoint_id": "checkpoint_id_value",
1019810202
"speculative_decoding_spec": {
1019910203
"draft_model_speculation": {"draft_model": "draft_model_value"},
1020010204
"ngram_speculation": {"ngram_size": 1071},

0 commit comments

Comments
 (0)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/googleapis/python-aiplatform/commit/f0812e3983df66ca4b53add8f8a8e9a4a9a7699a

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy