Skip to content

Commit 32877b4

Browse files
authored
Merge branch 'main' into main
2 parents e936c9a + 3e4fc18 commit 32877b4

File tree

28 files changed

+1118
-207
lines changed

28 files changed

+1118
-207
lines changed

google/cloud/aiplatform/tensorboard/plugins/tf_profiler/profile_uploader.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,10 @@ def send_request(self, run_name: str):
176176
self._profile_dir(run_name)
177177
)
178178

179-
tb_run = self._one_platform_resource_manager.get_run_resource_name(run_name)
179+
tensorboard_run_name = run_name if run_name else "profile"
180+
tb_run = self._one_platform_resource_manager.get_run_resource_name(
181+
tensorboard_run_name
182+
)
180183

181184
if run_name not in self._run_to_file_request_sender:
182185
self._run_to_file_request_sender[

google/cloud/aiplatform/tensorboard/uploader_utils.py

+3
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import re
2424
import time
2525
from typing import Callable, Dict, Generator, List, Optional, Tuple
26+
import uuid
2627

2728
from absl import app
2829
from google.api_core import exceptions
@@ -225,6 +226,8 @@ def _create_or_get_run_resource(
225226
project=project, location=location, run_name=run_name
226227
)
227228
if not experiment_run:
229+
if not run_name:
230+
run_name = str(uuid.uuid4())
228231
experiment_run = experiment_run_resource.ExperimentRun.create(
229232
project=project,
230233
location=location,

google/cloud/aiplatform_v1beta1/types/content.py

+18
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 openapi
2223
from google.cloud.aiplatform_v1beta1.types import tool
2324
from google.protobuf import duration_pb2 # type: ignore
2425
from google.type import date_pb2 # type: ignore
@@ -309,6 +310,17 @@ class GenerationConfig(proto.Message):
309310
The model needs to be prompted to output the appropriate
310311
response type, otherwise the behavior is undefined. This
311312
is a preview feature.
313+
response_schema (google.cloud.aiplatform_v1beta1.types.Schema):
314+
Optional. The ``Schema`` object allows the definition of
315+
input and output data types. These types can be objects, but
316+
also primitives and arrays. Represents a select subset of an
317+
`OpenAPI 3.0 schema
318+
object <https://spec.openapis.org/oas/v3.0.3#schema>`__. If
319+
set, a compatible response_mime_type must also be set.
320+
Compatible mimetypes: ``application/json``: Schema for JSON
321+
response.
322+
323+
This field is a member of `oneof`_ ``_response_schema``.
312324
"""
313325

314326
temperature: float = proto.Field(
@@ -354,6 +366,12 @@ class GenerationConfig(proto.Message):
354366
proto.STRING,
355367
number=13,
356368
)
369+
response_schema: openapi.Schema = proto.Field(
370+
proto.MESSAGE,
371+
number=16,
372+
optional=True,
373+
message=openapi.Schema,
374+
)
357375

358376

359377
class SafetySetting(proto.Message):

noxfile.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
FLAKE8_VERSION = "flake8==6.1.0"
2929
BLACK_VERSION = "black==22.3.0"
3030
ISORT_VERSION = "isort==5.10.1"
31-
LINT_PATHS = ["docs", "google", "tests", "noxfile.py", "setup.py"]
31+
LINT_PATHS = ["docs", "google", "vertexai", "tests", "noxfile.py", "setup.py"]
3232

3333
DEFAULT_PYTHON_VERSION = "3.8"
3434

0 commit comments

Comments
 (0)