Skip to content

Commit 9673b86

Browse files
1 parent 758cf59 commit 9673b86

File tree

2,949 files changed

+187
-2716927
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,949 files changed

+187
-2716927
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,
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_v1beta1/types/reasoning_engine.py

Lines changed: 125 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ class ReasoningEngineSpec(proto.Message):
4343
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
4444
4545
Attributes:
46+
source_code_spec (google.cloud.aiplatform_v1beta1.types.ReasoningEngineSpec.SourceCodeSpec):
47+
Deploy from source code files with a defined
48+
entrypoint.
49+
50+
This field is a member of `oneof`_ ``deployment_source``.
4651
service_account (str):
4752
Optional. The service account that the
4853
Reasoning Engine artifact runs as. It should
@@ -59,7 +64,8 @@ class ReasoningEngineSpec(proto.Message):
5964
Ignored when users directly specify a deployment image
6065
through ``deployment_spec.first_party_image_override``, but
6166
keeping the field_behavior to avoid introducing breaking
62-
changes.
67+
changes. The ``deployment_source`` field should not be set
68+
if ``package_spec`` is specified.
6369
deployment_spec (google.cloud.aiplatform_v1beta1.types.ReasoningEngineSpec.DeploymentSpec):
6470
Optional. The specification of a Reasoning
6571
Engine deployment.
@@ -74,8 +80,8 @@ class ReasoningEngineSpec(proto.Message):
7480
"""
7581

7682
class PackageSpec(proto.Message):
77-
r"""User provided package spec like pickled object and package
78-
requirements.
83+
r"""User-provided package specification, containing pickled
84+
object and package requirements.
7985
8086
Attributes:
8187
pickle_object_gcs_uri (str):
@@ -131,26 +137,31 @@ class DeploymentSpec(proto.Message):
131137
psc_interface_config (google.cloud.aiplatform_v1beta1.types.PscInterfaceConfig):
132138
Optional. Configuration for PSC-I.
133139
min_instances (int):
134-
Optional. The minimum number of application
135-
instances that will be kept running at all
136-
times. Defaults to 1.
140+
Optional. The minimum number of application instances that
141+
will be kept running at all times. Defaults to 1. Range: [0,
142+
10].
137143
138144
This field is a member of `oneof`_ ``_min_instances``.
139145
max_instances (int):
140-
Optional. The maximum number of application
141-
instances that can be launched to handle
142-
increased traffic. Defaults to 100.
146+
Optional. The maximum number of application instances that
147+
can be launched to handle increased traffic. Defaults to
148+
100. Range: [1, 1000].
149+
150+
If VPC-SC or PSC-I is enabled, the acceptable range is [1,
151+
100].
143152
144153
This field is a member of `oneof`_ ``_max_instances``.
145154
resource_limits (MutableMapping[str, str]):
146155
Optional. Resource limits for each container. Only 'cpu' and
147156
'memory' keys are supported. Defaults to {"cpu": "4",
148157
"memory": "4Gi"}.
149158
150-
- The only supported values for CPU are '1', '2', '4', and
151-
'8'. For more information, go to
159+
- The only supported values for CPU are '1', '2', '4', '6'
160+
and '8'. For more information, go to
152161
https://cloud.google.com/run/docs/configuring/cpu.
153-
- For supported 'memory' values and syntax, go to
162+
- The only supported values for memory are '1Gi', '2Gi', ...
163+
'32 Gi'.
164+
- For required cpu on different memory values, go to
154165
https://cloud.google.com/run/docs/configuring/memory-limits
155166
container_concurrency (int):
156167
Optional. Concurrency for each container and agent server.
@@ -195,6 +206,101 @@ class DeploymentSpec(proto.Message):
195206
optional=True,
196207
)
197208

209+
class SourceCodeSpec(proto.Message):
210+
r"""Specification for deploying from source code.
211+
212+
.. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields
213+
214+
Attributes:
215+
inline_source (google.cloud.aiplatform_v1beta1.types.ReasoningEngineSpec.SourceCodeSpec.InlineSource):
216+
Source code is provided directly in the
217+
request.
218+
219+
This field is a member of `oneof`_ ``source``.
220+
python_spec (google.cloud.aiplatform_v1beta1.types.ReasoningEngineSpec.SourceCodeSpec.PythonSpec):
221+
Configuration for a Python application.
222+
223+
This field is a member of `oneof`_ ``language_spec``.
224+
"""
225+
226+
class InlineSource(proto.Message):
227+
r"""Specifies source code provided as a byte stream.
228+
229+
Attributes:
230+
source_archive (bytes):
231+
Required. Input only. The application source
232+
code archive, provided as a compressed tarball
233+
(.tar.gz) file.
234+
"""
235+
236+
source_archive: bytes = proto.Field(
237+
proto.BYTES,
238+
number=1,
239+
)
240+
241+
class PythonSpec(proto.Message):
242+
r"""Specification for running a Python application from source.
243+
244+
Attributes:
245+
version (str):
246+
Optional. The version of Python to use.
247+
Support version includes 3.9, 3.10, 3.11, 3.12,
248+
3.13. If not specified, default value is 3.10.
249+
entrypoint_module (str):
250+
Optional. The Python module to load as the
251+
entrypoint, specified as a fully qualified
252+
module name. For example: path.to.agent. If not
253+
specified, defaults to "agent".
254+
255+
The project root will be added to Python
256+
sys.path, allowing imports to be specified
257+
relative to the root.
258+
entrypoint_object (str):
259+
Optional. The name of the callable object within the
260+
``entrypoint_module`` to use as the application If not
261+
specified, defaults to "root_agent".
262+
requirements_file (str):
263+
Optional. The path to the requirements file,
264+
relative to the source root. If not specified,
265+
defaults to "requirements.txt".
266+
"""
267+
268+
version: str = proto.Field(
269+
proto.STRING,
270+
number=1,
271+
)
272+
entrypoint_module: str = proto.Field(
273+
proto.STRING,
274+
number=2,
275+
)
276+
entrypoint_object: str = proto.Field(
277+
proto.STRING,
278+
number=3,
279+
)
280+
requirements_file: str = proto.Field(
281+
proto.STRING,
282+
number=4,
283+
)
284+
285+
inline_source: "ReasoningEngineSpec.SourceCodeSpec.InlineSource" = proto.Field(
286+
proto.MESSAGE,
287+
number=1,
288+
oneof="source",
289+
message="ReasoningEngineSpec.SourceCodeSpec.InlineSource",
290+
)
291+
python_spec: "ReasoningEngineSpec.SourceCodeSpec.PythonSpec" = proto.Field(
292+
proto.MESSAGE,
293+
number=2,
294+
oneof="language_spec",
295+
message="ReasoningEngineSpec.SourceCodeSpec.PythonSpec",
296+
)
297+
298+
source_code_spec: SourceCodeSpec = proto.Field(
299+
proto.MESSAGE,
300+
number=11,
301+
oneof="deployment_source",
302+
message=SourceCodeSpec,
303+
)
198304
service_account: str = proto.Field(
199305
proto.STRING,
200306
number=1,
@@ -257,6 +363,8 @@ class ReasoningEngine(proto.Message):
257363
ReasoningEngine. If set, this ReasoningEngine
258364
and all sub-resources of this ReasoningEngine
259365
will be secured by this key.
366+
labels (MutableMapping[str, str]):
367+
Labels for the ReasoningEngine.
260368
"""
261369

262370
name: str = proto.Field(
@@ -300,6 +408,11 @@ class ReasoningEngine(proto.Message):
300408
number=11,
301409
message=gca_encryption_spec.EncryptionSpec,
302410
)
411+
labels: MutableMapping[str, str] = proto.MapField(
412+
proto.STRING,
413+
proto.STRING,
414+
number=17,
415+
)
303416

304417

305418
class ReasoningEngineContextSpec(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.

0 commit comments

Comments
 (0)