Skip to content

Commit 031d43f

Browse files
author
Basil Beirouti
committed
fix endpoint bug
1 parent e0b9d38 commit 031d43f

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

src/sagemaker/session.py

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3553,19 +3553,17 @@ def endpoint_from_production_variants(
35533553
Returns:
35543554
str: The name of the created ``Endpoint``.
35553555
"""
3556-
if not _deployment_entity_exists(
3557-
lambda: self.sagemaker_client.describe_endpoint_config(EndpointConfigName=name)
3558-
):
3559-
config_options = {"EndpointConfigName": name, "ProductionVariants": production_variants}
3560-
tags = _append_project_tags(tags)
3561-
if tags:
3562-
config_options["Tags"] = tags
3563-
if kms_key:
3564-
config_options["KmsKeyId"] = kms_key
3565-
if data_capture_config_dict is not None:
3566-
config_options["DataCaptureConfig"] = data_capture_config_dict
3567-
3568-
self.sagemaker_client.create_endpoint_config(**config_options)
3556+
config_options = {"EndpointConfigName": name, "ProductionVariants": production_variants}
3557+
tags = _append_project_tags(tags)
3558+
if tags:
3559+
config_options["Tags"] = tags
3560+
if kms_key:
3561+
config_options["KmsKeyId"] = kms_key
3562+
if data_capture_config_dict is not None:
3563+
config_options["DataCaptureConfig"] = data_capture_config_dict
3564+
3565+
self.sagemaker_client.create_endpoint_config(**config_options)
3566+
35693567
return self.create_endpoint(endpoint_name=name, config_name=name, tags=tags, wait=wait)
35703568

35713569
def expand_role(self, role):

0 commit comments

Comments
 (0)