From 820e0b68159e70c262fbfa823ae21a1172f58cee Mon Sep 17 00:00:00 2001 From: Sara Robinson Date: Tue, 23 Sep 2025 16:23:02 -0700 Subject: [PATCH 1/5] feat: Gen AI SDK client - add experimental restore_version method to Prompt Management PiperOrigin-RevId: 810622217 --- setup.py | 2 +- .../replays/test_restore_prompt_version.py | 84 +++++++ vertexai/_genai/prompt_management.py | 235 +++++++++++++++++- vertexai/_genai/types.py | 98 +++++++- 4 files changed, 412 insertions(+), 7 deletions(-) create mode 100644 tests/unit/vertexai/genai/replays/test_restore_prompt_version.py diff --git a/setup.py b/setup.py index c645ae442b..8571eedd43 100644 --- a/setup.py +++ b/setup.py @@ -303,7 +303,7 @@ "google-cloud-bigquery >= 1.15.0, < 4.0.0, !=3.20.0", "google-cloud-resource-manager >= 1.3.3, < 3.0.0", "shapely < 3.0.0", - "google-genai >= 1.0.0, <2.0.0", + "google-genai >= 1.37.0, <2.0.0", ) + genai_requires, extras_require={ diff --git a/tests/unit/vertexai/genai/replays/test_restore_prompt_version.py b/tests/unit/vertexai/genai/replays/test_restore_prompt_version.py new file mode 100644 index 0000000000..96d38c8c26 --- /dev/null +++ b/tests/unit/vertexai/genai/replays/test_restore_prompt_version.py @@ -0,0 +1,84 @@ +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# pylint: disable=protected-access,bad-continuation,missing-function-docstring + +from tests.unit.vertexai.genai.replays import pytest_helper +from tests.unit.vertexai.genai.replays import test_create_prompt +from vertexai._genai import types +import pytest + + +TEST_PROMPT_DATASET_ID = "6550997480673116160" +TEST_PROMPT_VERSION_ID = "2" + + +def test_restore_version(client): + my_prompt = client.prompt_management.create_version( + prompt=test_create_prompt.TEST_PROMPT.model_dump(), + config=test_create_prompt.TEST_CONFIG, + ) + my_prompt_v1_id = my_prompt.dataset_version.name.split("/")[-1] + + # Create a second version on my_prompt + new_version = client.prompt_management.create_version( + prompt=test_create_prompt.TEST_PROMPT.model_dump(), + config=types.CreatePromptConfig( + prompt_id=my_prompt.prompt_id, version_display_name="my_prompt_v2" + ), + ) + my_prompt_v2_id = new_version.dataset_version.name.split("/")[-1] + assert my_prompt_v2_id != my_prompt_v1_id + + # Restore version to my_prompt_v1_id + restored_prompt = client.prompt_management.restore_version( + prompt_id=my_prompt.prompt_id, + version_id=my_prompt_v1_id, + ) + assert restored_prompt.dataset_version.name.split("/")[-1] == my_prompt_v1_id + + +pytestmark = pytest_helper.setup( + file=__file__, + globals_for_file=globals(), + test_method="prompt_management.restore_version", +) + +pytest_plugins = ("pytest_asyncio",) + + +@pytest.mark.asyncio +async def test_restore_version_async(client): + my_prompt = await client.aio.prompt_management.create_version( + prompt=test_create_prompt.TEST_PROMPT.model_dump(), + config=test_create_prompt.TEST_CONFIG, + ) + my_prompt_v1_id = my_prompt.dataset_version.name.split("/")[-1] + + # Create a second version on my_prompt + new_version = await client.aio.prompt_management.create_version( + prompt=test_create_prompt.TEST_PROMPT.model_dump(), + config=types.CreatePromptConfig( + prompt_id=my_prompt.prompt_id, version_display_name="my_prompt_v2" + ), + ) + my_prompt_v2_id = new_version.dataset_version.name.split("/")[-1] + assert my_prompt_v2_id != my_prompt_v1_id + + # Restore version to my_prompt_v1_id + restored_prompt = await client.aio.prompt_management.restore_version( + prompt_id=my_prompt.prompt_id, + version_id=my_prompt_v1_id, + ) + assert restored_prompt.dataset_version.name.split("/")[-1] == my_prompt_v1_id diff --git a/vertexai/_genai/prompt_management.py b/vertexai/_genai/prompt_management.py index ef65de259e..a7e016fdc2 100644 --- a/vertexai/_genai/prompt_management.py +++ b/vertexai/_genai/prompt_management.py @@ -534,6 +534,43 @@ def _ListPromptsConfig_to_vertex( return to_object +def _RestoreVersionOperation_from_vertex( + from_object: Union[dict[str, Any], object], + parent_object: Optional[dict[str, Any]] = None, +) -> dict[str, Any]: + to_object: dict[str, Any] = {} + if getv(from_object, ["name"]) is not None: + setv(to_object, ["name"], getv(from_object, ["name"])) + + if getv(from_object, ["metadata"]) is not None: + setv(to_object, ["metadata"], getv(from_object, ["metadata"])) + + if getv(from_object, ["done"]) is not None: + setv(to_object, ["done"], getv(from_object, ["done"])) + + if getv(from_object, ["error"]) is not None: + setv(to_object, ["error"], getv(from_object, ["error"])) + + return to_object + + +def _RestoreVersionRequestParameters_to_vertex( + from_object: Union[dict[str, Any], object], + parent_object: Optional[dict[str, Any]] = None, +) -> dict[str, Any]: + to_object: dict[str, Any] = {} + if getv(from_object, ["config"]) is not None: + setv(to_object, ["config"], getv(from_object, ["config"])) + + if getv(from_object, ["dataset_id"]) is not None: + setv(to_object, ["_url", "dataset_id"], getv(from_object, ["dataset_id"])) + + if getv(from_object, ["version_id"]) is not None: + setv(to_object, ["_url", "version_id"], getv(from_object, ["version_id"])) + + return to_object + + def _SchemaTextPromptDatasetMetadata_from_vertex( from_object: Union[dict[str, Any], object], parent_object: Optional[dict[str, Any]] = None, @@ -930,7 +967,7 @@ def _get_dataset_operation( operation_id: Optional[str] = None, ) -> types.DatasetOperation: """ - Gets the operation from creating a dataset version. + Gets the operation from creating a dataset. """ parameter_model = types._GetDatasetOperationParameters( @@ -1203,6 +1240,66 @@ def _delete_dataset_version( self._api_client._verify_response(return_value) return return_value + def _restore_version( + self, + *, + config: Optional[types.RestoreVersionConfigOrDict] = None, + dataset_id: str, + version_id: str, + ) -> types.RestoreVersionOperation: + """ + Restores the provided prompt version to the latest version. + """ + + parameter_model = types._RestoreVersionRequestParameters( + config=config, + dataset_id=dataset_id, + version_id=version_id, + ) + + request_url_dict: Optional[dict[str, str]] + if not self._api_client.vertexai: + raise ValueError("This method is only supported in the Vertex AI client.") + else: + request_dict = _RestoreVersionRequestParameters_to_vertex(parameter_model) + request_url_dict = request_dict.get("_url") + if request_url_dict: + path = "datasets/{dataset_id}/datasetVersions/{version_id}:restore".format_map( + request_url_dict + ) + else: + path = "datasets/{dataset_id}/datasetVersions/{version_id}:restore" + + query_params = request_dict.get("_query") + if query_params: + path = f"{path}?{urlencode(query_params)}" + # TODO: remove the hack that pops config. + request_dict.pop("config", None) + + http_options: Optional[types.HttpOptions] = None + if ( + parameter_model.config is not None + and parameter_model.config.http_options is not None + ): + http_options = parameter_model.config.http_options + + request_dict = _common.convert_to_dict(request_dict) + request_dict = _common.encode_unserializable_types(request_dict) + + response = self._api_client.request("get", path, request_dict, http_options) + + response_dict = "" if not response.body else json.loads(response.body) + + if self._api_client.vertexai: + response_dict = _RestoreVersionOperation_from_vertex(response_dict) + + return_value = types.RestoreVersionOperation._from_response( + response=response_dict, kwargs=parameter_model.model_dump() + ) + + self._api_client._verify_response(return_value) + return return_value + def create_version( self, *, @@ -1631,6 +1728,42 @@ def delete_version( f"Deleted prompt version {version_id} from prompt with id: {prompt_id}" ) + def restore_version( + self, + *, + prompt_id: str, + version_id: str, + config: Optional[types.RestoreVersionConfig] = None, + ) -> types.Prompt: + """Restores the provided prompt version to the latest version. + + Args: + prompt_id: The id of the Vertex Dataset resource containing the prompt. For example, if the prompt resource name is "projects/123/locations/us-central1/datasets/456", then the prompt_id is "456". + version_id: The id of the Vertex Dataset Version resource to restore. For example, if the version resource name is "projects/123/locations/us-central1/datasets/456/datasetVersions/789", then the version_id is "789". + config: Optional configuration for restoring the prompt version. + + Returns: + A types.Prompt object representing the prompt with the updated Dataset Version resource. + """ + + restore_prompt_operation = self._restore_version( + dataset_id=prompt_id, + version_id=version_id, + ) + self._wait_for_project_operation( + operation=restore_prompt_operation, + timeout=config.timeout if config else 90, + ) + dataset_version_resource = self._get_dataset_version_resource( + dataset_id=prompt_id, + dataset_version_id=version_id, + ) + updated_prompt = _prompt_management_utils._create_prompt_from_dataset_metadata( + dataset_version_resource, + ) + updated_prompt._dataset_version = dataset_version_resource + return updated_prompt + class AsyncPromptManagement(_api_module.BaseModule): @@ -1896,7 +2029,7 @@ async def _get_dataset_operation( operation_id: Optional[str] = None, ) -> types.DatasetOperation: """ - Gets the operation from creating a dataset version. + Gets the operation from creating a dataset. """ parameter_model = types._GetDatasetOperationParameters( @@ -2179,6 +2312,68 @@ async def _delete_dataset_version( self._api_client._verify_response(return_value) return return_value + async def _restore_version( + self, + *, + config: Optional[types.RestoreVersionConfigOrDict] = None, + dataset_id: str, + version_id: str, + ) -> types.RestoreVersionOperation: + """ + Restores the provided prompt version to the latest version. + """ + + parameter_model = types._RestoreVersionRequestParameters( + config=config, + dataset_id=dataset_id, + version_id=version_id, + ) + + request_url_dict: Optional[dict[str, str]] + if not self._api_client.vertexai: + raise ValueError("This method is only supported in the Vertex AI client.") + else: + request_dict = _RestoreVersionRequestParameters_to_vertex(parameter_model) + request_url_dict = request_dict.get("_url") + if request_url_dict: + path = "datasets/{dataset_id}/datasetVersions/{version_id}:restore".format_map( + request_url_dict + ) + else: + path = "datasets/{dataset_id}/datasetVersions/{version_id}:restore" + + query_params = request_dict.get("_query") + if query_params: + path = f"{path}?{urlencode(query_params)}" + # TODO: remove the hack that pops config. + request_dict.pop("config", None) + + http_options: Optional[types.HttpOptions] = None + if ( + parameter_model.config is not None + and parameter_model.config.http_options is not None + ): + http_options = parameter_model.config.http_options + + request_dict = _common.convert_to_dict(request_dict) + request_dict = _common.encode_unserializable_types(request_dict) + + response = await self._api_client.async_request( + "get", path, request_dict, http_options + ) + + response_dict = "" if not response.body else json.loads(response.body) + + if self._api_client.vertexai: + response_dict = _RestoreVersionOperation_from_vertex(response_dict) + + return_value = types.RestoreVersionOperation._from_response( + response=response_dict, kwargs=parameter_model.model_dump() + ) + + self._api_client._verify_response(return_value) + return return_value + async def create_version( self, *, @@ -2604,3 +2799,39 @@ async def list_versions( prompt_id=prompt_id, ) yield prompt_version_ref + + async def restore_version( + self, + *, + prompt_id: str, + version_id: str, + config: Optional[types.RestoreVersionConfig] = None, + ) -> types.Prompt: + """Restores the provided prompt version to the latest version. + + Args: + prompt_id: The id of the Vertex Dataset resource containing the prompt. For example, if the prompt resource name is "projects/123/locations/us-central1/datasets/456", then the prompt_id is "456". + version_id: The id of the Vertex Dataset Version resource to restore. For example, if the version resource name is "projects/123/locations/us-central1/datasets/456/datasetVersions/789", then the version_id is "789". + config: Optional configuration for restoring the prompt version. + + Returns: + A types.Prompt object representing the prompt with the updated Dataset Version resource. + """ + + restore_prompt_operation = await self._restore_version( + dataset_id=prompt_id, + version_id=version_id, + ) + await self._wait_for_project_operation( + operation=restore_prompt_operation, + timeout=config.timeout if config else 90, + ) + dataset_version_resource = await self._get_dataset_version_resource( + dataset_id=prompt_id, + dataset_version_id=version_id, + ) + updated_prompt = _prompt_management_utils._create_prompt_from_dataset_metadata( + dataset_version_resource, + ) + updated_prompt._dataset_version = dataset_version_resource + return updated_prompt diff --git a/vertexai/_genai/types.py b/vertexai/_genai/types.py index 29e47f5ea4..c8fc5e4ea0 100644 --- a/vertexai/_genai/types.py +++ b/vertexai/_genai/types.py @@ -8036,7 +8036,7 @@ class DatasetOperation(_common.BaseModel): description="""The error result of the operation in case of failure or cancellation.""", ) response: Optional[dict[str, Any]] = Field( - default=None, description="""The result of the operation.""" + default=None, description="""The result of the dataset operation.""" ) @@ -8056,7 +8056,7 @@ class DatasetOperationDict(TypedDict, total=False): """The error result of the operation in case of failure or cancellation.""" response: Optional[dict[str, Any]] - """The result of the operation.""" + """The result of the dataset operation.""" DatasetOperationOrDict = Union[DatasetOperation, DatasetOperationDict] @@ -8486,7 +8486,7 @@ class GetDatasetOperationConfigDict(TypedDict, total=False): class _GetDatasetOperationParameters(_common.BaseModel): - """Parameters for getting a dataset resource to store prompts.""" + """Parameters for getting a dataset operation.""" config: Optional[GetDatasetOperationConfig] = Field( default=None, description="""""" @@ -8496,7 +8496,7 @@ class _GetDatasetOperationParameters(_common.BaseModel): class _GetDatasetOperationParametersDict(TypedDict, total=False): - """Parameters for getting a dataset resource to store prompts.""" + """Parameters for getting a dataset operation.""" config: Optional[GetDatasetOperationConfigDict] """""" @@ -8818,6 +8818,96 @@ class DeletePromptVersionOperationDict(TypedDict, total=False): ] +class RestoreVersionConfig(_common.BaseModel): + """Config for restoring a prompt version.""" + + http_options: Optional[genai_types.HttpOptions] = Field( + default=None, description="""Used to override HTTP request options.""" + ) + + +class RestoreVersionConfigDict(TypedDict, total=False): + """Config for restoring a prompt version.""" + + http_options: Optional[genai_types.HttpOptionsDict] + """Used to override HTTP request options.""" + + +RestoreVersionConfigOrDict = Union[RestoreVersionConfig, RestoreVersionConfigDict] + + +class _RestoreVersionRequestParameters(_common.BaseModel): + """Parameters for restoring a prompt version.""" + + config: Optional[RestoreVersionConfig] = Field(default=None, description="""""") + dataset_id: Optional[str] = Field( + default=None, description="""ID of the prompt dataset to be restored.""" + ) + version_id: Optional[str] = Field( + default=None, description="""ID of the prompt dataset version to be restored.""" + ) + + +class _RestoreVersionRequestParametersDict(TypedDict, total=False): + """Parameters for restoring a prompt version.""" + + config: Optional[RestoreVersionConfigDict] + """""" + + dataset_id: Optional[str] + """ID of the prompt dataset to be restored.""" + + version_id: Optional[str] + """ID of the prompt dataset version to be restored.""" + + +_RestoreVersionRequestParametersOrDict = Union[ + _RestoreVersionRequestParameters, _RestoreVersionRequestParametersDict +] + + +class RestoreVersionOperation(_common.BaseModel): + """Represents the restore version operation.""" + + name: Optional[str] = Field( + default=None, + description="""The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.""", + ) + metadata: Optional[dict[str, Any]] = Field( + default=None, + description="""Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.""", + ) + done: Optional[bool] = Field( + default=None, + description="""If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.""", + ) + error: Optional[dict[str, Any]] = Field( + default=None, + description="""The error result of the operation in case of failure or cancellation.""", + ) + + +class RestoreVersionOperationDict(TypedDict, total=False): + """Represents the restore version operation.""" + + name: Optional[str] + """The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`.""" + + metadata: Optional[dict[str, Any]] + """Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.""" + + done: Optional[bool] + """If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available.""" + + error: Optional[dict[str, Any]] + """The error result of the operation in case of failure or cancellation.""" + + +RestoreVersionOperationOrDict = Union[ + RestoreVersionOperation, RestoreVersionOperationDict +] + + class PromptOptimizerVAPOConfig(_common.BaseModel): """VAPO Prompt Optimizer Config.""" From da8f96db099f39216f18cc4f4cd09870fae7ae33 Mon Sep 17 00:00:00 2001 From: Ayush Agrawal Date: Wed, 24 Sep 2025 16:36:51 -0700 Subject: [PATCH 2/5] chore: Ignore E704 errors to satisfy flake8 and black. PiperOrigin-RevId: 811085431 --- .flake8 | 2 +- vertexai/_genai/_agent_engines_utils.py | 2 +- vertexai/generative_models/_generative_models.py | 16 ++++++++-------- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.flake8 b/.flake8 index 028b384a3d..90316de214 100644 --- a/.flake8 +++ b/.flake8 @@ -16,7 +16,7 @@ [flake8] # TODO(https://github.com/googleapis/gapic-generator-python/issues/2333): # Resolve flake8 lint issues -ignore = E203, E231, E266, E501, W503, E704 +ignore = E203, E231, E266, E501, W503 exclude = # TODO(https://github.com/googleapis/gapic-generator-python/issues/2333): # Ensure that generated code passes flake8 lint diff --git a/vertexai/_genai/_agent_engines_utils.py b/vertexai/_genai/_agent_engines_utils.py index 601539f1fa..c9e2e37848 100644 --- a/vertexai/_genai/_agent_engines_utils.py +++ b/vertexai/_genai/_agent_engines_utils.py @@ -1414,7 +1414,7 @@ def _method(self, **kwargs) -> Any: # type: ignore[no-untyped-def] class GetOperationFunction(Protocol): - def __call__( + def __call__( # noqa: E704 self, *, operation_name: str, **kwargs ) -> AgentEngineOperationUnion: ... diff --git a/vertexai/generative_models/_generative_models.py b/vertexai/generative_models/_generative_models.py index 11abb10f38..e9d5c26505 100644 --- a/vertexai/generative_models/_generative_models.py +++ b/vertexai/generative_models/_generative_models.py @@ -639,7 +639,7 @@ def _parse_response( return GenerationResponse._from_gapic(response) @overload - def generate_content( + def generate_content( # noqa: E704 self, contents: ContentsType, *, @@ -652,7 +652,7 @@ def generate_content( ) -> "GenerationResponse": ... @overload - def generate_content( + def generate_content( # noqa: E704 self, contents: ContentsType, *, @@ -717,7 +717,7 @@ def generate_content( ) @overload - async def generate_content_async( + async def generate_content_async( # noqa: E704 self, contents: ContentsType, *, @@ -730,7 +730,7 @@ async def generate_content_async( ) -> "GenerationResponse": ... @overload - async def generate_content_async( + async def generate_content_async( # noqa: E704 self, contents: ContentsType, *, @@ -1282,7 +1282,7 @@ def history(self) -> List["Content"]: return self._history @overload - def send_message( + def send_message( # noqa: E704 self, content: PartsType, *, @@ -1294,7 +1294,7 @@ def send_message( ) -> "GenerationResponse": ... @overload - def send_message( + def send_message( # noqa: E704 self, content: PartsType, *, @@ -1354,7 +1354,7 @@ def send_message( ) @overload - def send_message_async( + def send_message_async( # noqa: E704 self, content: PartsType, *, @@ -1366,7 +1366,7 @@ def send_message_async( ) -> Awaitable["GenerationResponse"]: ... @overload - def send_message_async( + def send_message_async( # noqa: E704 self, content: PartsType, *, From f796e747f0c2c106e6ab83d2b2af0169c882ff58 Mon Sep 17 00:00:00 2001 From: A Vertex SDK engineer Date: Wed, 24 Sep 2025 19:34:39 -0700 Subject: [PATCH 3/5] feat: expose user reservation for CustomModel PiperOrigin-RevId: 811137043 --- .../model_garden/test_model_garden.py | 43 +++++++++++++++++ vertexai/model_garden/_model_garden.py | 47 +++++++++++++++++++ 2 files changed, 90 insertions(+) diff --git a/tests/unit/vertexai/model_garden/test_model_garden.py b/tests/unit/vertexai/model_garden/test_model_garden.py index e064debe82..819dd728ed 100644 --- a/tests/unit/vertexai/model_garden/test_model_garden.py +++ b/tests/unit/vertexai/model_garden/test_model_garden.py @@ -1476,6 +1476,49 @@ def test_deploy_custom_model_with_all_config_success(self, deploy_mock): ) ) + def test_deploy_custom_model_with_reservation_success(self, deploy_mock): + aiplatform.init( + project=_TEST_PROJECT, + location=_TEST_LOCATION, + ) + model = model_garden_preview.CustomModel(gcs_uri=_TEST_GCS_URI) + model.deploy( + machine_type="n1-standard-4", + accelerator_type="NVIDIA_TESLA_T4", + accelerator_count=1, + reservation_affinity_type="SPECIFIC_RESERVATION", + reservation_affinity_key="compute.googleapis.com/reservation-name", + reservation_affinity_values=[ + "projects/test-project/zones/us-central1-a/reservations/test-reservation" + ], + ) + deploy_mock.assert_called_once_with( + types.DeployRequest( + destination=f"projects/{_TEST_PROJECT}/locations/{_TEST_LOCATION}", + custom_model=types.DeployRequest.CustomModel( + gcs_uri=_TEST_GCS_URI, + ), + deploy_config=types.DeployRequest.DeployConfig( + dedicated_resources=types.DedicatedResources( + min_replica_count=1, + max_replica_count=1, + machine_spec=types.MachineSpec( + machine_type="n1-standard-4", + accelerator_type="NVIDIA_TESLA_T4", + accelerator_count=1, + reservation_affinity=types.ReservationAffinity( + reservation_affinity_type="SPECIFIC_RESERVATION", + key="compute.googleapis.com/reservation-name", + values=[ + "projects/test-project/zones/us-central1-a/reservations/test-reservation" + ], + ), + ), + ), + ), + ) + ) + @pytest.mark.parametrize("filter_by_user_quota", [True, False]) def test_list_deploy_options_with_recommendations(self, filter_by_user_quota): """Tests list_deploy_options when recommend_spec returns recommendations.""" diff --git a/vertexai/model_garden/_model_garden.py b/vertexai/model_garden/_model_garden.py index 14dcae4a4f..16dc2d900c 100644 --- a/vertexai/model_garden/_model_garden.py +++ b/vertexai/model_garden/_model_garden.py @@ -987,6 +987,9 @@ def deploy( max_replica_count: int = 1, accelerator_type: Optional[str] = None, accelerator_count: Optional[int] = None, + reservation_affinity_type: Optional[str] = None, + reservation_affinity_key: Optional[str] = None, + reservation_affinity_values: Optional[List[str]] = None, endpoint_display_name: Optional[str] = None, model_display_name: Optional[str] = None, deploy_request_timeout: Optional[float] = None, @@ -1016,6 +1019,19 @@ def deploy( set accelerator_count if used. accelerator_count (int): Optional. The number of accelerators to attach to a worker replica. + reservation_affinity_type (str): Optional. The type of reservation + affinity. One of NO_RESERVATION, ANY_RESERVATION, + SPECIFIC_RESERVATION, SPECIFIC_THEN_ANY_RESERVATION, + SPECIFIC_THEN_NO_RESERVATION + reservation_affinity_key (str): Optional. Corresponds to the label key + of a reservation resource. To target a SPECIFIC_RESERVATION by name, + use `compute.googleapis.com/reservation-name` as the key and specify + the name of your reservation as its value. + reservation_affinity_values (List[str]): Optional. Corresponds to the + label values of a reservation resource. This must be the full resource + name of the reservation. + Format: + 'projects/{project_id_or_number}/zones/{zone}/reservations/{reservation_name}' endpoint_display_name: The display name of the created endpoint. model_display_name: The display name of the custom model. deploy_request_timeout: The timeout for the deploy request. Default is 2 @@ -1031,6 +1047,9 @@ def deploy( max_replica_count=max_replica_count, accelerator_type=accelerator_type, accelerator_count=accelerator_count, + reservation_affinity_type=reservation_affinity_type, + reservation_affinity_key=reservation_affinity_key, + reservation_affinity_values=reservation_affinity_values, endpoint_display_name=endpoint_display_name, model_display_name=model_display_name, deploy_request_timeout=deploy_request_timeout, @@ -1049,6 +1068,9 @@ def _deploy_gcs_uri( max_replica_count: int = 1, accelerator_type: Optional[str] = None, accelerator_count: Optional[int] = None, + reservation_affinity_type: Optional[str] = None, + reservation_affinity_key: Optional[str] = None, + reservation_affinity_values: Optional[List[str]] = None, endpoint_display_name: Optional[str] = None, model_display_name: Optional[str] = None, deploy_request_timeout: Optional[float] = None, @@ -1080,6 +1102,19 @@ def _deploy_gcs_uri( NVIDIA_TESLA_P4, NVIDIA_TESLA_T4 accelerator_count (int): Optional. The number of accelerators to attach to a worker replica. + reservation_affinity_type (str): Optional. The type of reservation + affinity. One of NO_RESERVATION, ANY_RESERVATION, + SPECIFIC_RESERVATION, SPECIFIC_THEN_ANY_RESERVATION, + SPECIFIC_THEN_NO_RESERVATION + reservation_affinity_key (str): Optional. Corresponds to the label key + of a reservation resource. To target a SPECIFIC_RESERVATION by name, + use `compute.googleapis.com/reservation-name` as the key and specify + the name of your reservation as its value. + reservation_affinity_values (List[str]): Optional. Corresponds to the + label values of a reservation resource. This must be the full resource + name of the reservation. + Format: + 'projects/{project_id_or_number}/zones/{zone}/reservations/{reservation_name}' endpoint_display_name: The display name of the created endpoint. model_display_name: The display name of the custom model. deploy_request_timeout: The timeout for the deploy request. Default is 2 @@ -1128,6 +1163,18 @@ def has_all_or_none_values(var1, var2, var3) -> bool: max_replica_count ) + if reservation_affinity_type: + request.deploy_config.dedicated_resources.machine_spec.reservation_affinity.reservation_affinity_type = ( + reservation_affinity_type + ) + if reservation_affinity_key and reservation_affinity_values: + request.deploy_config.dedicated_resources.machine_spec.reservation_affinity.key = ( + reservation_affinity_key + ) + request.deploy_config.dedicated_resources.machine_spec.reservation_affinity.values = ( + reservation_affinity_values + ) + _LOGGER.info(f"Deploying custom model: {self._gcs_uri}") try: From c3c2f7f4d7dddb2d2bc76557582f0958cd80c951 Mon Sep 17 00:00:00 2001 From: Sara Robinson Date: Thu, 25 Sep 2025 07:06:07 -0700 Subject: [PATCH 4/5] docs: add generated docs for Gen AI Modules PiperOrigin-RevId: 811335847 --- gemini_docs/README.md | 256 ++++++++++++++++++++++++++++-- gemini_docs/vertexai/vertexai.rst | 31 ++++ vertexai/_genai/client.py | 4 +- 3 files changed, 280 insertions(+), 11 deletions(-) diff --git a/gemini_docs/README.md b/gemini_docs/README.md index 3ffe4ffd1a..95c1735809 100644 --- a/gemini_docs/README.md +++ b/gemini_docs/README.md @@ -1,12 +1,9 @@ # Vertex Generative AI SDK for Python -The Vertex Generative AI SDK helps developers use Google's generative AI +The Gen AI Modules in the Vertex SDK help developers use Google's generative AI [Gemini models](http://cloud.google.com/vertex-ai/docs/generative-ai/multimodal/overview) -to build AI-powered features and applications. -The SDKs support use cases like the following: +to build AI-powered features and applications in Vertex. -- Generate text from texts, images and videos (multimodal generation) -- Build stateful multi-turn conversations (chat) -- Function calling +The modules currently available are: Evaluation, Agent Engines, Prompt Management, and Prompt Optimization. See below for instructions on getting started with each module. For other Gemini features on Vertex, use the [Gen AI SDK](https://github.com/googleapis/python-genai). ## Installation @@ -15,12 +12,253 @@ To install the Python package, run the following command: ```shell -pip3 install --upgrade --user "google-cloud-aiplatform>=1.38" +pip3 install --upgrade --user "google-cloud-aiplatform>=1.114.0" ``` -## Usage +#### Imports: +```python +import vertexai +from vertexai import types +``` + +#### Client initialization + +```python +client = vertexai.Client(project='my-project', location='us-central1') +``` + +#### Gen AI Evaluation + +To run evaluation, first generate model responses from a set of prompts. + +```python +import pandas as pd + +prompts_df = pd.DataFrame({ + "prompt": [ + "What is the capital of France?", + "Write a haiku about a cat.", + "Write a Python function to calculate the factorial of a number.", + "Translate 'How are you?' to French.", + ], +}) + +inference_results = client.evals.run_inference( + model="gemini-2.5-flash", + ("def factorial(n):\n" + " if n < 0:\n" + " return 'Factorial does not exist for negative numbers'\n" + " elif n == 0:\n" + " return 1\n" + " else:\n" + " fact = 1\n" + " i = 1\n" + " while i <= n:\n" + " fact *= i\n" + " i += 1\n" + " return fact"), +) +inference_results.show() +``` + +Then run evaluation by providing the inference results and specifying the metric types. + +```python +eval_result = client.evals.evaluate( + dataset=inference_results, + metrics=[ + types.RubricMetric.GENERAL_QUALITY, + ] +) +eval_result.show() +``` + +#### Agent Engine with Agent Development Kit (ADK) + +First, define a function that looks up the exchange rate: + +```python +def get_exchange_rate( + currency_from: str = "USD", + currency_to: str = "EUR", + currency_date: str = "latest", +): + """Retrieves the exchange rate between two currencies on a specified date. + + Uses the Frankfurter API (https://api.frankfurter.app/) to obtain + exchange rate data. + + Returns: + dict: A dictionary containing the exchange rate information. + Example: {"amount": 1.0, "base": "USD", "date": "2023-11-24", + "rates": {"EUR": 0.95534}} + """ + import requests + response = requests.get( + f"https://api.frankfurter.app/%7Bcurrency_date%7D", + params={"from": currency_from, "to": currency_to}, + ) + return response.json() +``` + +Next, define an ADK Agent: + +```python + +from google.adk.agents import Agent +from vertexai.agent_engines import AdkApp + +app = AdkApp(agent=Agent( + model="gemini-2.0-flash", # Required. + name='currency_exchange_agent', # Required. + tools=[get_exchange_rate], # Optional. +)) +``` + +Test the agent locally using US dollars and Swedish Krona: + +```python +async for event in app.async_stream_query( + user_id="user-id", + message="What is the exchange rate from US dollars to SEK today?", +): + print(event) +``` + +To deploy the agent to Agent Engine: + +```python +remote_app = client.agent_engines.create( + agent=app, + config={ + "requirements": ["google-cloud-aiplatform[agent_engines,adk]"], + }, +) +``` + +You can also run queries against the deployed agent: + +```python +async for event in remote_app.async_stream_query( + user_id="user-id", + message="What is the exchange rate from US dollars to SEK today?", +): + print(event) +``` + +#### Prompt Optimization + +To do a zero-shot prompt optimization, use the `optimize_prompt` +method. + +```python +prompt = "Generate system instructions for a question-answering assistant" +response = client.prompt_optimizer.optimize_prompt(prompt=prompt) +print(response.raw_text_response) +if response.parsed_response: + print(response.parsed_response.suggested_prompt) +``` + +To call the data-driven prompt optimization, call the `optimize` method. +In this case however, we need to provide `vapo_config`. This config needs to +have either service account or project **number** and the config path. +Please refer to this [tutorial](https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/data-driven-optimizer) +for more details on config parameter. + +```python +import logging + +project_number = PROJECT_NUMBER # replace with your project number +service_account = f"{project_number}-compute@developer.gserviceaccount.com" + +vapo_config = types.PromptOptimizerVAPOConfig( + config_path="gs://your-bucket/config.json", + service_account_project_number=project_number, + wait_for_completion=False +) + +# Set up logging to see the progress of the optimization job +logging.basicConfig(encoding='utf-8', level=logging.INFO, force=True) + +result = client.prompt_optimizer.optimize(method="vapo", config=vapo_config) +``` + +We can also call optimize method async. + +```python +await client.aio.prompt_optimizer.optimize(method="vapo", config=vapo_config) +``` + +#### Prompt Management + +The Prompt Management module uses some types from the Gen AI SDK. First, import those types: + +```python +from google.genai import types as genai_types +``` + +To create and store a Prompt, first define a types.Prompt object and then run `create_version` to save it in Vertex. + +```python +prompt = types.Prompt( + prompt_data=types.PromptData( + contents=[genai_types.Content(parts=[genai_types.Part(text="Hello, {name}! How are you?")])], + system_instruction=genai_types.Content(parts=[genai_types.Part(text="Please answer in a short sentence.")]), + generation_config=genai_types.GenerationConfig(temperature=0.1), + safety_settings=[genai_types.SafetySetting( + category="HARM_CATEGORY_DANGEROUS_CONTENT", + threshold="BLOCK_MEDIUM_AND_ABOVE", + method="SEVERITY", + )], + variables=[ + {"name": genai_types.Part(text="Alice")}, + {"name": genai_types.Part(text="Bob")}, + ], + model="gemini-2.0-flash-001", + ), +) + +prompt_resource = client.prompt_management.create_version( + prompt=prompt, +) +``` + +To retrieve a prompt, provide the `prompt_id`: + +```python +retrieved_prompt = client.prompt_management.get(prompt_id=prompt_resource.prompt_id) +``` + +After creating or retrieving a prompt, you can call `generate_content()` with that prompt using the Gen AI SDK. + +The following uses a utility function available on Prompt objects to transform a Prompt object into a list of Part objects for use with `generate_content`. To run this you need to have the Gen AI SDK installed, which you can do via `pip install google-genai`. + +```python +from google import genai +from google.genai import types as genai_types + +# Create a Client in the Gen AI SDK +genai_client = genai.Client(vertexai=True, project="your-project", location="your-location") + +# Call generate_content() with the prompt +response = genai_client.models.generate_content( + model=retrieved_prompt.prompt_data.model, + contents=retrieved_prompt.assemble_contents(), +) +``` + +## Warning + +The following Generative AI modules in the Vertex AI SDK are deprecated as of +June 24, 2025 and will be removed on June 24, 2026: +`vertexai.generative_models`, `vertexai.language_models`, +`vertexai.vision_models`, `vertexai.tuning`, `vertexai.caching`. Please use the +[Google Gen AI SDK](https://pypi.org/project/google-genai/) to access these +features. See +[the migration guide](https://cloud.google.com/vertex-ai/generative-ai/docs/deprecations/genai-vertexai-sdk) +for details. You can continue using all other Vertex AI SDK modules, as they are +the recommended way to use the API. -For detailed instructions, see [quickstart](http://cloud.google.com/vertex-ai/docs/generative-ai/start/quickstarts/quickstart-multimodal) and [Introduction to multimodal classes in the Vertex AI SDK](http://cloud.google.com/vertex-ai/docs/generative-ai/multimodal/sdk-for-gemini/gemini-sdk-overview-reference). #### Imports: ```python diff --git a/gemini_docs/vertexai/vertexai.rst b/gemini_docs/vertexai/vertexai.rst index 475a65ef02..beb75f00bc 100644 --- a/gemini_docs/vertexai/vertexai.rst +++ b/gemini_docs/vertexai/vertexai.rst @@ -6,6 +6,37 @@ Vertex AI SDK :show-inheritance: :inherited-members: +.. autoclass:: vertexai.Client + :members: + :undoc-members: + :show-inheritance: + :inherited-members: + + .. autoattribute:: evals + .. autoattribute:: agent_engines + .. autoattribute:: prompt_optimizer + .. autoattribute:: prompt_management + +.. automodule:: vertexai._genai.evals + :members: + :undoc-members: + :show-inheritance: + +.. automodule:: vertexai._genai.agent_engines + :members: + :undoc-members: + :show-inheritance: + +.. automodule:: vertexai._genai.prompt_optimizer + :members: + :undoc-members: + :show-inheritance: + +.. automodule:: vertexai._genai.prompt_management + :members: + :undoc-members: + :show-inheritance: + .. automodule:: vertexai.generative_models :members: :show-inheritance: diff --git a/vertexai/_genai/client.py b/vertexai/_genai/client.py index aee9672985..fb9f4fd0f0 100644 --- a/vertexai/_genai/client.py +++ b/vertexai/_genai/client.py @@ -46,7 +46,7 @@ def _add_tracking_headers(headers: dict[str, str]) -> None: class AsyncClient: - """Async Client for the GenAI SDK.""" + """Async Gen AI Client for the Vertex SDK.""" def __init__(self, api_client: genai_client.Client): self._api_client = api_client @@ -124,7 +124,7 @@ def prompt_management(self): class Client: - """Client for the GenAI SDK. + """Gen AI Client for the Vertex SDK. Use this client to interact with Vertex-specific Gemini features. """ From 523e16d056ba98278dcc678cf6cb55679329caff Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 25 Sep 2025 14:05:08 -0700 Subject: [PATCH 5/5] chore(main): release 1.117.0 (#5839) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- .release-please-manifest.json | 2 +- CHANGELOG.md | 13 +++++++++++++ google/cloud/aiplatform/gapic_version.py | 2 +- .../v1/schema/predict/instance/gapic_version.py | 2 +- .../v1/schema/predict/instance_v1/gapic_version.py | 2 +- .../v1/schema/predict/params/gapic_version.py | 2 +- .../v1/schema/predict/params_v1/gapic_version.py | 2 +- .../v1/schema/predict/prediction/gapic_version.py | 2 +- .../schema/predict/prediction_v1/gapic_version.py | 2 +- .../schema/trainingjob/definition/gapic_version.py | 2 +- .../trainingjob/definition_v1/gapic_version.py | 2 +- .../schema/predict/instance/gapic_version.py | 2 +- .../predict/instance_v1beta1/gapic_version.py | 2 +- .../v1beta1/schema/predict/params/gapic_version.py | 2 +- .../schema/predict/params_v1beta1/gapic_version.py | 2 +- .../schema/predict/prediction/gapic_version.py | 2 +- .../predict/prediction_v1beta1/gapic_version.py | 2 +- .../schema/trainingjob/definition/gapic_version.py | 2 +- .../trainingjob/definition_v1beta1/gapic_version.py | 2 +- google/cloud/aiplatform/version.py | 2 +- google/cloud/aiplatform_v1/gapic_version.py | 2 +- google/cloud/aiplatform_v1beta1/gapic_version.py | 2 +- pypi/_vertex_ai_placeholder/version.py | 2 +- ...snippet_metadata_google.cloud.aiplatform.v1.json | 2 +- ...et_metadata_google.cloud.aiplatform.v1beta1.json | 2 +- 25 files changed, 37 insertions(+), 24 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index e275cc3c25..abbf15aa48 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "1.116.0" + ".": "1.117.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index a5e64e4e5c..007e85159b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,18 @@ # Changelog +## [1.117.0](https://github.com/googleapis/python-aiplatform/compare/v1.116.0...v1.117.0) (2025-09-25) + + +### Features + +* Expose user reservation for CustomModel ([f796e74](https://github.com/googleapis/python-aiplatform/commit/f796e747f0c2c106e6ab83d2b2af0169c882ff58)) +* Gen AI SDK client - add experimental restore_version method to Prompt Management ([820e0b6](https://github.com/googleapis/python-aiplatform/commit/820e0b68159e70c262fbfa823ae21a1172f58cee)) + + +### Documentation + +* Add generated docs for Gen AI Modules ([c3c2f7f](https://github.com/googleapis/python-aiplatform/commit/c3c2f7f4d7dddb2d2bc76557582f0958cd80c951)) + ## [1.116.0](https://github.com/googleapis/python-aiplatform/compare/v1.115.0...v1.116.0) (2025-09-22) diff --git a/google/cloud/aiplatform/gapic_version.py b/google/cloud/aiplatform/gapic_version.py index a299e2bf67..de4c14d50b 100644 --- a/google/cloud/aiplatform/gapic_version.py +++ b/google/cloud/aiplatform/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.116.0" # {x-release-please-version} +__version__ = "1.117.0" # {x-release-please-version} diff --git a/google/cloud/aiplatform/v1/schema/predict/instance/gapic_version.py b/google/cloud/aiplatform/v1/schema/predict/instance/gapic_version.py index a299e2bf67..de4c14d50b 100644 --- a/google/cloud/aiplatform/v1/schema/predict/instance/gapic_version.py +++ b/google/cloud/aiplatform/v1/schema/predict/instance/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.116.0" # {x-release-please-version} +__version__ = "1.117.0" # {x-release-please-version} diff --git a/google/cloud/aiplatform/v1/schema/predict/instance_v1/gapic_version.py b/google/cloud/aiplatform/v1/schema/predict/instance_v1/gapic_version.py index a299e2bf67..de4c14d50b 100644 --- a/google/cloud/aiplatform/v1/schema/predict/instance_v1/gapic_version.py +++ b/google/cloud/aiplatform/v1/schema/predict/instance_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.116.0" # {x-release-please-version} +__version__ = "1.117.0" # {x-release-please-version} diff --git a/google/cloud/aiplatform/v1/schema/predict/params/gapic_version.py b/google/cloud/aiplatform/v1/schema/predict/params/gapic_version.py index a299e2bf67..de4c14d50b 100644 --- a/google/cloud/aiplatform/v1/schema/predict/params/gapic_version.py +++ b/google/cloud/aiplatform/v1/schema/predict/params/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.116.0" # {x-release-please-version} +__version__ = "1.117.0" # {x-release-please-version} diff --git a/google/cloud/aiplatform/v1/schema/predict/params_v1/gapic_version.py b/google/cloud/aiplatform/v1/schema/predict/params_v1/gapic_version.py index a299e2bf67..de4c14d50b 100644 --- a/google/cloud/aiplatform/v1/schema/predict/params_v1/gapic_version.py +++ b/google/cloud/aiplatform/v1/schema/predict/params_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.116.0" # {x-release-please-version} +__version__ = "1.117.0" # {x-release-please-version} diff --git a/google/cloud/aiplatform/v1/schema/predict/prediction/gapic_version.py b/google/cloud/aiplatform/v1/schema/predict/prediction/gapic_version.py index a299e2bf67..de4c14d50b 100644 --- a/google/cloud/aiplatform/v1/schema/predict/prediction/gapic_version.py +++ b/google/cloud/aiplatform/v1/schema/predict/prediction/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.116.0" # {x-release-please-version} +__version__ = "1.117.0" # {x-release-please-version} diff --git a/google/cloud/aiplatform/v1/schema/predict/prediction_v1/gapic_version.py b/google/cloud/aiplatform/v1/schema/predict/prediction_v1/gapic_version.py index a299e2bf67..de4c14d50b 100644 --- a/google/cloud/aiplatform/v1/schema/predict/prediction_v1/gapic_version.py +++ b/google/cloud/aiplatform/v1/schema/predict/prediction_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.116.0" # {x-release-please-version} +__version__ = "1.117.0" # {x-release-please-version} diff --git a/google/cloud/aiplatform/v1/schema/trainingjob/definition/gapic_version.py b/google/cloud/aiplatform/v1/schema/trainingjob/definition/gapic_version.py index a299e2bf67..de4c14d50b 100644 --- a/google/cloud/aiplatform/v1/schema/trainingjob/definition/gapic_version.py +++ b/google/cloud/aiplatform/v1/schema/trainingjob/definition/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.116.0" # {x-release-please-version} +__version__ = "1.117.0" # {x-release-please-version} diff --git a/google/cloud/aiplatform/v1/schema/trainingjob/definition_v1/gapic_version.py b/google/cloud/aiplatform/v1/schema/trainingjob/definition_v1/gapic_version.py index a299e2bf67..de4c14d50b 100644 --- a/google/cloud/aiplatform/v1/schema/trainingjob/definition_v1/gapic_version.py +++ b/google/cloud/aiplatform/v1/schema/trainingjob/definition_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.116.0" # {x-release-please-version} +__version__ = "1.117.0" # {x-release-please-version} diff --git a/google/cloud/aiplatform/v1beta1/schema/predict/instance/gapic_version.py b/google/cloud/aiplatform/v1beta1/schema/predict/instance/gapic_version.py index a299e2bf67..de4c14d50b 100644 --- a/google/cloud/aiplatform/v1beta1/schema/predict/instance/gapic_version.py +++ b/google/cloud/aiplatform/v1beta1/schema/predict/instance/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.116.0" # {x-release-please-version} +__version__ = "1.117.0" # {x-release-please-version} diff --git a/google/cloud/aiplatform/v1beta1/schema/predict/instance_v1beta1/gapic_version.py b/google/cloud/aiplatform/v1beta1/schema/predict/instance_v1beta1/gapic_version.py index a299e2bf67..de4c14d50b 100644 --- a/google/cloud/aiplatform/v1beta1/schema/predict/instance_v1beta1/gapic_version.py +++ b/google/cloud/aiplatform/v1beta1/schema/predict/instance_v1beta1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.116.0" # {x-release-please-version} +__version__ = "1.117.0" # {x-release-please-version} diff --git a/google/cloud/aiplatform/v1beta1/schema/predict/params/gapic_version.py b/google/cloud/aiplatform/v1beta1/schema/predict/params/gapic_version.py index a299e2bf67..de4c14d50b 100644 --- a/google/cloud/aiplatform/v1beta1/schema/predict/params/gapic_version.py +++ b/google/cloud/aiplatform/v1beta1/schema/predict/params/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.116.0" # {x-release-please-version} +__version__ = "1.117.0" # {x-release-please-version} diff --git a/google/cloud/aiplatform/v1beta1/schema/predict/params_v1beta1/gapic_version.py b/google/cloud/aiplatform/v1beta1/schema/predict/params_v1beta1/gapic_version.py index a299e2bf67..de4c14d50b 100644 --- a/google/cloud/aiplatform/v1beta1/schema/predict/params_v1beta1/gapic_version.py +++ b/google/cloud/aiplatform/v1beta1/schema/predict/params_v1beta1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.116.0" # {x-release-please-version} +__version__ = "1.117.0" # {x-release-please-version} diff --git a/google/cloud/aiplatform/v1beta1/schema/predict/prediction/gapic_version.py b/google/cloud/aiplatform/v1beta1/schema/predict/prediction/gapic_version.py index a299e2bf67..de4c14d50b 100644 --- a/google/cloud/aiplatform/v1beta1/schema/predict/prediction/gapic_version.py +++ b/google/cloud/aiplatform/v1beta1/schema/predict/prediction/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.116.0" # {x-release-please-version} +__version__ = "1.117.0" # {x-release-please-version} diff --git a/google/cloud/aiplatform/v1beta1/schema/predict/prediction_v1beta1/gapic_version.py b/google/cloud/aiplatform/v1beta1/schema/predict/prediction_v1beta1/gapic_version.py index a299e2bf67..de4c14d50b 100644 --- a/google/cloud/aiplatform/v1beta1/schema/predict/prediction_v1beta1/gapic_version.py +++ b/google/cloud/aiplatform/v1beta1/schema/predict/prediction_v1beta1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.116.0" # {x-release-please-version} +__version__ = "1.117.0" # {x-release-please-version} diff --git a/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/gapic_version.py b/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/gapic_version.py index a299e2bf67..de4c14d50b 100644 --- a/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/gapic_version.py +++ b/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.116.0" # {x-release-please-version} +__version__ = "1.117.0" # {x-release-please-version} diff --git a/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition_v1beta1/gapic_version.py b/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition_v1beta1/gapic_version.py index a299e2bf67..de4c14d50b 100644 --- a/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition_v1beta1/gapic_version.py +++ b/google/cloud/aiplatform/v1beta1/schema/trainingjob/definition_v1beta1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.116.0" # {x-release-please-version} +__version__ = "1.117.0" # {x-release-please-version} diff --git a/google/cloud/aiplatform/version.py b/google/cloud/aiplatform/version.py index 46dd2a2baa..d5de891b39 100644 --- a/google/cloud/aiplatform/version.py +++ b/google/cloud/aiplatform/version.py @@ -15,4 +15,4 @@ # limitations under the License. # -__version__ = "1.116.0" +__version__ = "1.117.0" diff --git a/google/cloud/aiplatform_v1/gapic_version.py b/google/cloud/aiplatform_v1/gapic_version.py index a299e2bf67..de4c14d50b 100644 --- a/google/cloud/aiplatform_v1/gapic_version.py +++ b/google/cloud/aiplatform_v1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.116.0" # {x-release-please-version} +__version__ = "1.117.0" # {x-release-please-version} diff --git a/google/cloud/aiplatform_v1beta1/gapic_version.py b/google/cloud/aiplatform_v1beta1/gapic_version.py index a299e2bf67..de4c14d50b 100644 --- a/google/cloud/aiplatform_v1beta1/gapic_version.py +++ b/google/cloud/aiplatform_v1beta1/gapic_version.py @@ -13,4 +13,4 @@ # See the License for the specific language governing permissions and # limitations under the License. # -__version__ = "1.116.0" # {x-release-please-version} +__version__ = "1.117.0" # {x-release-please-version} diff --git a/pypi/_vertex_ai_placeholder/version.py b/pypi/_vertex_ai_placeholder/version.py index 22b8338ce1..9dbc366e45 100644 --- a/pypi/_vertex_ai_placeholder/version.py +++ b/pypi/_vertex_ai_placeholder/version.py @@ -15,4 +15,4 @@ # limitations under the License. # -__version__ = "1.116.0" +__version__ = "1.117.0" diff --git a/samples/generated_samples/snippet_metadata_google.cloud.aiplatform.v1.json b/samples/generated_samples/snippet_metadata_google.cloud.aiplatform.v1.json index 04beb40ab9..892c2526df 100644 --- a/samples/generated_samples/snippet_metadata_google.cloud.aiplatform.v1.json +++ b/samples/generated_samples/snippet_metadata_google.cloud.aiplatform.v1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-aiplatform", - "version": "1.116.0" + "version": "1.117.0" }, "snippets": [ { diff --git a/samples/generated_samples/snippet_metadata_google.cloud.aiplatform.v1beta1.json b/samples/generated_samples/snippet_metadata_google.cloud.aiplatform.v1beta1.json index bef7b2a179..1ace81099b 100644 --- a/samples/generated_samples/snippet_metadata_google.cloud.aiplatform.v1beta1.json +++ b/samples/generated_samples/snippet_metadata_google.cloud.aiplatform.v1beta1.json @@ -8,7 +8,7 @@ ], "language": "PYTHON", "name": "google-cloud-aiplatform", - "version": "1.116.0" + "version": "1.117.0" }, "snippets": [ {