Skip to content

Commit 00e902a

Browse files
1 parent 698bc87 commit 00e902a

File tree

2,967 files changed

+337
-2722395
lines changed

Some content is hidden

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

2,967 files changed

+337
-2722395
lines changed

google/cloud/aiplatform_v1/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -976,6 +976,7 @@
976976
from .types.tool import FunctionResponsePart
977977
from .types.tool import GoogleMaps
978978
from .types.tool import GoogleSearchRetrieval
979+
from .types.tool import PartialArg
979980
from .types.tool import RagRetrievalConfig
980981
from .types.tool import Retrieval
981982
from .types.tool import RetrievalConfig
@@ -1752,6 +1753,7 @@
17521753
"PairwiseSummarizationQualityResult",
17531754
"PairwiseSummarizationQualitySpec",
17541755
"Part",
1756+
"PartialArg",
17551757
"PauseModelDeploymentMonitoringJobRequest",
17561758
"PauseScheduleRequest",
17571759
"PersistentDiskSpec",

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/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1093,6 +1093,7 @@
10931093
FunctionResponsePart,
10941094
GoogleMaps,
10951095
GoogleSearchRetrieval,
1096+
PartialArg,
10961097
RagRetrievalConfig,
10971098
Retrieval,
10981099
RetrievalConfig,
@@ -2078,6 +2079,7 @@
20782079
"FunctionResponsePart",
20792080
"GoogleMaps",
20802081
"GoogleSearchRetrieval",
2082+
"PartialArg",
20812083
"RagRetrievalConfig",
20822084
"Retrieval",
20832085
"RetrievalConfig",

google/cloud/aiplatform_v1/types/tool.py

Lines changed: 101 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
"UrlContext",
3232
"FunctionDeclaration",
3333
"FunctionCall",
34+
"PartialArg",
3435
"FunctionResponsePart",
3536
"FunctionResponseBlob",
3637
"FunctionResponseFileData",
@@ -391,12 +392,22 @@ class FunctionCall(proto.Message):
391392
392393
Attributes:
393394
name (str):
394-
Required. The name of the function to call. Matches
395+
Optional. The name of the function to call. Matches
395396
[FunctionDeclaration.name].
396397
args (google.protobuf.struct_pb2.Struct):
397-
Optional. Required. The function parameters and values in
398-
JSON object format. See [FunctionDeclaration.parameters] for
399-
parameter details.
398+
Optional. The function parameters and values in JSON object
399+
format. See [FunctionDeclaration.parameters] for parameter
400+
details.
401+
partial_args (MutableSequence[google.cloud.aiplatform_v1.types.PartialArg]):
402+
Optional. The partial argument value of the
403+
function call. If provided, represents the
404+
arguments/fields that are streamed
405+
incrementally.
406+
will_continue (bool):
407+
Optional. Whether this is the last part of
408+
the FunctionCall. If true, another partial
409+
message for the current FunctionCall is expected
410+
to follow.
400411
"""
401412

402413
name: str = proto.Field(
@@ -408,6 +419,83 @@ class FunctionCall(proto.Message):
408419
number=2,
409420
message=struct_pb2.Struct,
410421
)
422+
partial_args: MutableSequence["PartialArg"] = proto.RepeatedField(
423+
proto.MESSAGE,
424+
number=4,
425+
message="PartialArg",
426+
)
427+
will_continue: bool = proto.Field(
428+
proto.BOOL,
429+
number=5,
430+
)
431+
432+
433+
class PartialArg(proto.Message):
434+
r"""Partial argument value of the function call.
435+
436+
This message has `oneof`_ fields (mutually exclusive fields).
437+
For each oneof, at most one member field can be set at the same time.
438+
Setting any member of the oneof automatically clears all other
439+
members.
440+
441+
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
442+
443+
Attributes:
444+
null_value (google.protobuf.struct_pb2.NullValue):
445+
Optional. Represents a null value.
446+
447+
This field is a member of `oneof`_ ``delta``.
448+
number_value (float):
449+
Optional. Represents a double value.
450+
451+
This field is a member of `oneof`_ ``delta``.
452+
string_value (str):
453+
Optional. Represents a string value.
454+
455+
This field is a member of `oneof`_ ``delta``.
456+
bool_value (bool):
457+
Optional. Represents a boolean value.
458+
459+
This field is a member of `oneof`_ ``delta``.
460+
json_path (str):
461+
Required. A JSON Path (RFC 9535) to the argument being
462+
streamed. https://datatracker.ietf.org/doc/html/rfc9535.
463+
e.g. "$.foo.bar[0].data".
464+
will_continue (bool):
465+
Optional. Whether this is not the last part of the same
466+
json_path. If true, another PartialArg message for the
467+
current json_path is expected to follow.
468+
"""
469+
470+
null_value: struct_pb2.NullValue = proto.Field(
471+
proto.ENUM,
472+
number=2,
473+
oneof="delta",
474+
enum=struct_pb2.NullValue,
475+
)
476+
number_value: float = proto.Field(
477+
proto.DOUBLE,
478+
number=3,
479+
oneof="delta",
480+
)
481+
string_value: str = proto.Field(
482+
proto.STRING,
483+
number=4,
484+
oneof="delta",
485+
)
486+
bool_value: bool = proto.Field(
487+
proto.BOOL,
488+
number=5,
489+
oneof="delta",
490+
)
491+
json_path: str = proto.Field(
492+
proto.STRING,
493+
number=1,
494+
)
495+
will_continue: bool = proto.Field(
496+
proto.BOOL,
497+
number=6,
498+
)
411499

412500

413501
class FunctionResponsePart(proto.Message):
@@ -991,6 +1079,11 @@ class FunctionCallingConfig(proto.Message):
9911079
ANY. Function names should match [FunctionDeclaration.name].
9921080
With mode set to ANY, model will predict a function call
9931081
from the set of function names provided.
1082+
stream_function_call_arguments (bool):
1083+
Optional. When set to true, arguments of a single function
1084+
call will be streamed out in multiple
1085+
parts/contents/responses. Partial parameter results will be
1086+
returned in the [FunctionCall.partial_args] field.
9941087
"""
9951088

9961089
class Mode(proto.Enum):
@@ -1030,6 +1123,10 @@ class Mode(proto.Enum):
10301123
proto.STRING,
10311124
number=2,
10321125
)
1126+
stream_function_call_arguments: bool = proto.Field(
1127+
proto.BOOL,
1128+
number=4,
1129+
)
10331130

10341131

10351132
class RetrievalConfig(proto.Message):

google/cloud/aiplatform_v1beta1/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -743,6 +743,7 @@
743743
from .types.machine_resources import DiskSpec
744744
from .types.machine_resources import FlexStart
745745
from .types.machine_resources import FullFineTunedResources
746+
from .types.machine_resources import LustreMount
746747
from .types.machine_resources import MachineSpec
747748
from .types.machine_resources import NfsMount
748749
from .types.machine_resources import PersistentDiskSpec
@@ -2028,6 +2029,7 @@
20282029
"LlmUtilityServiceClient",
20292030
"LogprobsResult",
20302031
"LookupStudyRequest",
2032+
"LustreMount",
20312033
"MachineSpec",
20322034
"ManualBatchTuningParameters",
20332035
"MatchServiceClient",

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -265,40 +265,40 @@ def parse_dataset_path(path: str) -> Dict[str, str]:
265265
@staticmethod
266266
def dataset_path(
267267
project: str,
268+
location: str,
268269
dataset: str,
269270
) -> str:
270271
"""Returns a fully-qualified dataset string."""
271-
return "projects/{project}/datasets/{dataset}".format(
272+
return "projects/{project}/locations/{location}/datasets/{dataset}".format(
272273
project=project,
274+
location=location,
273275
dataset=dataset,
274276
)
275277

276278
@staticmethod
277279
def parse_dataset_path(path: str) -> Dict[str, str]:
278280
"""Parses a dataset path into its component segments."""
279-
m = re.match(r"^projects/(?P<project>.+?)/datasets/(?P<dataset>.+?)$", path)
281+
m = re.match(
282+
r"^projects/(?P<project>.+?)/locations/(?P<location>.+?)/datasets/(?P<dataset>.+?)$",
283+
path,
284+
)
280285
return m.groupdict() if m else {}
281286

282287
@staticmethod
283288
def dataset_path(
284289
project: str,
285-
location: str,
286290
dataset: str,
287291
) -> str:
288292
"""Returns a fully-qualified dataset string."""
289-
return "projects/{project}/locations/{location}/datasets/{dataset}".format(
293+
return "projects/{project}/datasets/{dataset}".format(
290294
project=project,
291-
location=location,
292295
dataset=dataset,
293296
)
294297

295298
@staticmethod
296299
def parse_dataset_path(path: str) -> Dict[str, str]:
297300
"""Parses a dataset path into its component segments."""
298-
m = re.match(
299-
r"^projects/(?P<project>.+?)/locations/(?P<location>.+?)/datasets/(?P<dataset>.+?)$",
300-
path,
301-
)
301+
m = re.match(r"^projects/(?P<project>.+?)/datasets/(?P<dataset>.+?)$", path)
302302
return m.groupdict() if m else {}
303303

304304
@staticmethod

google/cloud/aiplatform_v1beta1/types/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -770,6 +770,7 @@
770770
DiskSpec,
771771
FlexStart,
772772
FullFineTunedResources,
773+
LustreMount,
773774
MachineSpec,
774775
NfsMount,
775776
PersistentDiskSpec,
@@ -2102,6 +2103,7 @@
21022103
"DiskSpec",
21032104
"FlexStart",
21042105
"FullFineTunedResources",
2106+
"LustreMount",
21052107
"MachineSpec",
21062108
"NfsMount",
21072109
"PersistentDiskSpec",

google/cloud/aiplatform_v1beta1/types/custom_job.py

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -420,6 +420,8 @@ class WorkerPoolSpec(proto.Message):
420420
use for this worker pool.
421421
nfs_mounts (MutableSequence[google.cloud.aiplatform_v1beta1.types.NfsMount]):
422422
Optional. List of NFS mount spec.
423+
lustre_mounts (MutableSequence[google.cloud.aiplatform_v1beta1.types.LustreMount]):
424+
Optional. List of Lustre mounts.
423425
disk_spec (google.cloud.aiplatform_v1beta1.types.DiskSpec):
424426
Disk spec.
425427
"""
@@ -450,6 +452,11 @@ class WorkerPoolSpec(proto.Message):
450452
number=4,
451453
message=machine_resources.NfsMount,
452454
)
455+
lustre_mounts: MutableSequence[machine_resources.LustreMount] = proto.RepeatedField(
456+
proto.MESSAGE,
457+
number=9,
458+
message=machine_resources.LustreMount,
459+
)
453460
disk_spec: machine_resources.DiskSpec = proto.Field(
454461
proto.MESSAGE,
455462
number=5,
@@ -553,13 +560,13 @@ class Scheduling(proto.Message):
553560
554561
Attributes:
555562
timeout (google.protobuf.duration_pb2.Duration):
556-
The maximum job running time. The default is
557-
7 days.
563+
Optional. The maximum job running time. The
564+
default is 7 days.
558565
restart_job_on_worker_restart (bool):
559-
Restarts the entire CustomJob if a worker
560-
gets restarted. This feature can be used by
561-
distributed training jobs that are not resilient
562-
to workers leaving and joining a job.
566+
Optional. Restarts the entire CustomJob if a
567+
worker gets restarted. This feature can be used
568+
by distributed training jobs that are not
569+
resilient to workers leaving and joining a job.
563570
strategy (google.cloud.aiplatform_v1beta1.types.Scheduling.Strategy):
564571
Optional. This determines which type of
565572
scheduling strategy to use.

google/cloud/aiplatform_v1beta1/types/machine_resources.py

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
"DiskSpec",
4141
"PersistentDiskSpec",
4242
"NfsMount",
43+
"LustreMount",
4344
"AutoscalingMetricSpec",
4445
"ShieldedVmConfig",
4546
"FlexStart",
@@ -569,6 +570,40 @@ class NfsMount(proto.Message):
569570
)
570571

571572

573+
class LustreMount(proto.Message):
574+
r"""Represents a mount configuration for Lustre file system.
575+
576+
Attributes:
577+
instance_ip (str):
578+
Required. IP address of the Lustre instance.
579+
volume_handle (str):
580+
Required. The unique identifier of the Lustre
581+
volume.
582+
filesystem (str):
583+
Required. The name of the Lustre filesystem.
584+
mount_point (str):
585+
Required. Destination mount path. The Lustre file system
586+
will be mounted for the user under /mnt/lustre/<mount_point>
587+
"""
588+
589+
instance_ip: str = proto.Field(
590+
proto.STRING,
591+
number=1,
592+
)
593+
volume_handle: str = proto.Field(
594+
proto.STRING,
595+
number=2,
596+
)
597+
filesystem: str = proto.Field(
598+
proto.STRING,
599+
number=3,
600+
)
601+
mount_point: str = proto.Field(
602+
proto.STRING,
603+
number=4,
604+
)
605+
606+
572607
class AutoscalingMetricSpec(proto.Message):
573608
r"""The metric specification that defines the target resource
574609
utilization (CPU utilization, accelerator's duty cycle, and so

0 commit comments

Comments
 (0)