Skip to content

Commit 1a3f477

Browse files
vertex-sdk-botcopybara-github
authored andcommitted
feat: enabled deploy dedicated endpoint by default
PiperOrigin-RevId: 797057754
1 parent d0c7803 commit 1a3f477

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

tests/unit/vertexai/model_garden/test_model_garden.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -947,13 +947,13 @@ def test_deploy_with_dedicated_endpoint_success(self, deploy_mock):
947947
location=_TEST_LOCATION,
948948
)
949949
model = model_garden.OpenModel(model_name=_TEST_MODEL_FULL_RESOURCE_NAME)
950-
model.deploy(use_dedicated_endpoint=True)
950+
model.deploy(dedicated_endpoint_disabled=True)
951951
deploy_mock.assert_called_once_with(
952952
types.DeployRequest(
953953
publisher_model_name=_TEST_MODEL_FULL_RESOURCE_NAME,
954954
destination=f"projects/{_TEST_PROJECT}/locations/{_TEST_LOCATION}",
955955
endpoint_config=types.DeployRequest.EndpointConfig(
956-
dedicated_endpoint_enabled=True
956+
dedicated_endpoint_disabled=True
957957
),
958958
)
959959
)

vertexai/model_garden/_model_garden.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,7 @@ def deploy(
393393
reservation_affinity_key: Optional[str] = None,
394394
reservation_affinity_values: Optional[List[str]] = None,
395395
use_dedicated_endpoint: Optional[bool] = False,
396+
dedicated_endpoint_disabled: Optional[bool] = False,
396397
fast_tryout_enabled: Optional[bool] = False,
397398
system_labels: Optional[Dict[str, str]] = None,
398399
endpoint_display_name: Optional[str] = None,
@@ -464,6 +465,10 @@ def deploy(
464465
use_dedicated_endpoint (bool): Optional. Default value is False. If set
465466
to True, the underlying prediction call will be made using the
466467
dedicated endpoint dns.
468+
dedicated_endpoint_disabled (bool): Optional. Default value is False. If set
469+
to False, the underlying prediction call will be made using the
470+
dedicated endpoint dns. Otherwise, the prediction call will be made
471+
using the shared endpoint dns.
467472
fast_tryout_enabled (bool): Optional. Defaults to False. If True, model
468473
will be deployed using faster deployment path. Useful for quick
469474
experiments. Not for production workloads. Only available for most
@@ -604,9 +609,15 @@ def deploy(
604609
reservation_affinity_values
605610
)
606611

612+
# TODO(b/417560875): Remove this once notebooks are migrated to use dedicated_endpoint_disabled.
607613
if use_dedicated_endpoint:
608614
request.endpoint_config.dedicated_endpoint_enabled = use_dedicated_endpoint
609615

616+
if dedicated_endpoint_disabled:
617+
request.endpoint_config.dedicated_endpoint_disabled = (
618+
dedicated_endpoint_disabled
619+
)
620+
610621
if fast_tryout_enabled:
611622
request.deploy_config.fast_tryout_enabled = fast_tryout_enabled
612623

0 commit comments

Comments
 (0)