Skip to content

Commit 3ac9630

Browse files
1 parent 65c6362 commit 3ac9630

File tree

2,947 files changed

+135
-2713401
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,947 files changed

+135
-2713401
lines changed

google/cloud/aiplatform_v1beta1/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,
247246
dataset: str,
248247
) -> str:
249248
"""Returns a fully-qualified dataset string."""
250-
return "projects/{project}/locations/{location}/datasets/{dataset}".format(
249+
return "projects/{project}/datasets/{dataset}".format(
251250
project=project,
252-
location=location,
253251
dataset=dataset,
254252
)
255253

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

265260
@staticmethod
266261
def dataset_path(
267262
project: str,
263+
location: str,
268264
dataset: str,
269265
) -> str:
270266
"""Returns a fully-qualified dataset string."""
271-
return "projects/{project}/datasets/{dataset}".format(
267+
return "projects/{project}/locations/{location}/datasets/{dataset}".format(
272268
project=project,
269+
location=location,
273270
dataset=dataset,
274271
)
275272

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

282282
@staticmethod

google/cloud/aiplatform_v1beta1/types/machine_resources.py

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,23 @@ class DedicatedResources(proto.Message):
178178
available_replica_count reaches required_replica_count, and
179179
the rest of the replicas will be retried. If not set, the
180180
default required_replica_count will be min_replica_count.
181+
initial_replica_count (int):
182+
Immutable. Number of initial replicas being deployed on when
183+
scaling the workload up from zero or when creating the
184+
workload in case
185+
[min_replica_count][google.cloud.aiplatform.v1beta1.DedicatedResources.min_replica_count]
186+
= 0. When
187+
[min_replica_count][google.cloud.aiplatform.v1beta1.DedicatedResources.min_replica_count]
188+
189+
0 (meaning that the scale-to-zero feature is not
190+
enabled),
191+
[initial_replica_count][google.cloud.aiplatform.v1beta1.DedicatedResources.initial_replica_count]
192+
should not be set. When
193+
[min_replica_count][google.cloud.aiplatform.v1beta1.DedicatedResources.min_replica_count]
194+
= 0 (meaning that the scale-to-zero feature is enabled),
195+
[initial_replica_count][google.cloud.aiplatform.v1beta1.DedicatedResources.initial_replica_count]
196+
should be larger than zero, but no greater than
197+
[max_replica_count][google.cloud.aiplatform.v1beta1.DedicatedResources.max_replica_count].
181198
autoscaling_metric_specs (MutableSequence[google.cloud.aiplatform_v1beta1.types.AutoscalingMetricSpec]):
182199
Immutable. The metric specifications that overrides a
183200
resource utilization metric (CPU utilization, accelerator's
@@ -214,8 +231,35 @@ class DedicatedResources(proto.Message):
214231
to schedule the deployment workload. reference:
215232
216233
(https://cloud.google.com/blog/products/compute/introducing-dynamic-workload-scheduler)
234+
scale_to_zero_spec (google.cloud.aiplatform_v1beta1.types.DedicatedResources.ScaleToZeroSpec):
235+
Optional. Specification for scale-to-zero
236+
feature.
217237
"""
218238

239+
class ScaleToZeroSpec(proto.Message):
240+
r"""Specification for scale-to-zero feature.
241+
242+
Attributes:
243+
min_scaleup_period (google.protobuf.duration_pb2.Duration):
244+
Optional. Minimum duration that a deployment will be scaled
245+
up before traffic is evaluated for potential scale-down.
246+
[MinValue=300] (5 minutes) [MaxValue=28800] (8 hours)
247+
idle_scaledown_period (google.protobuf.duration_pb2.Duration):
248+
Optional. Duration of no traffic before scaling to zero.
249+
[MinValue=3600] (5 minutes) [MaxValue=28800] (8 hours)
250+
"""
251+
252+
min_scaleup_period: duration_pb2.Duration = proto.Field(
253+
proto.MESSAGE,
254+
number=1,
255+
message=duration_pb2.Duration,
256+
)
257+
idle_scaledown_period: duration_pb2.Duration = proto.Field(
258+
proto.MESSAGE,
259+
number=2,
260+
message=duration_pb2.Duration,
261+
)
262+
219263
machine_spec: "MachineSpec" = proto.Field(
220264
proto.MESSAGE,
221265
number=1,
@@ -233,6 +277,10 @@ class DedicatedResources(proto.Message):
233277
proto.INT32,
234278
number=9,
235279
)
280+
initial_replica_count: int = proto.Field(
281+
proto.INT32,
282+
number=6,
283+
)
236284
autoscaling_metric_specs: MutableSequence["AutoscalingMetricSpec"] = (
237285
proto.RepeatedField(
238286
proto.MESSAGE,
@@ -249,6 +297,11 @@ class DedicatedResources(proto.Message):
249297
number=10,
250298
message="FlexStart",
251299
)
300+
scale_to_zero_spec: ScaleToZeroSpec = proto.Field(
301+
proto.MESSAGE,
302+
number=11,
303+
message=ScaleToZeroSpec,
304+
)
252305

253306

254307
class AutomaticResources(proto.Message):

owl-bot-staging/v1/.coveragerc

Lines changed: 0 additions & 13 deletions
This file was deleted.

owl-bot-staging/v1/.flake8

Lines changed: 0 additions & 34 deletions
This file was deleted.

owl-bot-staging/v1/LICENSE

Lines changed: 0 additions & 202 deletions
This file was deleted.

0 commit comments

Comments
 (0)