diff --git a/src/sagemaker/huggingface/model.py b/src/sagemaker/huggingface/model.py index 74eeeb2546..ac9d1c852c 100644 --- a/src/sagemaker/huggingface/model.py +++ b/src/sagemaker/huggingface/model.py @@ -200,6 +200,7 @@ def deploy( deserializer=None, accelerator_type=None, endpoint_name=None, + variant_name="AllTraffic", tags=None, kms_key=None, wait=True, @@ -253,6 +254,8 @@ def deploy( https://docs.aws.amazon.com/sagemaker/latest/dg/ei.html endpoint_name (str): The name of the endpoint to create (default: None). If not specified, a unique endpoint name will be created. + variant_name (string): The ``VariantName`` of this production variant + (default: 'AllTraffic'). tags (List[dict[str, str]]): The list of tags to attach to this specific endpoint. kms_key (str): The ARN of the KMS key that is used to encrypt the @@ -317,6 +320,7 @@ def deploy( deserializer, accelerator_type, endpoint_name, + variant_name, tags, kms_key, wait, diff --git a/src/sagemaker/model.py b/src/sagemaker/model.py index d0f833795c..1488075ed0 100644 --- a/src/sagemaker/model.py +++ b/src/sagemaker/model.py @@ -1190,6 +1190,7 @@ def deploy( deserializer=None, accelerator_type=None, endpoint_name=None, + variant_name="AllTraffic", tags=None, kms_key=None, wait=True, @@ -1245,6 +1246,8 @@ def deploy( https://docs.aws.amazon.com/sagemaker/latest/dg/ei.html endpoint_name (str): The name of the endpoint to create (default: None). If not specified, a unique endpoint name will be created. + variant_name (string): The ``VariantName`` of this production variant + (default: 'AllTraffic'). tags (List[dict[str, str]]): The list of tags to attach to this specific endpoint. kms_key (str): The ARN of the KMS key that is used to encrypt the @@ -1388,6 +1391,7 @@ def deploy( self.name, instance_type, initial_instance_count, + variant_name=variant_name, accelerator_type=accelerator_type, serverless_inference_config=serverless_inference_config_dict, volume_size=volume_size, diff --git a/src/sagemaker/multidatamodel.py b/src/sagemaker/multidatamodel.py index 93b73850ec..b5b7a7b82d 100644 --- a/src/sagemaker/multidatamodel.py +++ b/src/sagemaker/multidatamodel.py @@ -159,6 +159,7 @@ def deploy( deserializer=None, accelerator_type=None, endpoint_name=None, + variant_name="AllTraffic", tags=None, kms_key=None, wait=True, @@ -204,6 +205,8 @@ def deploy( https://docs.aws.amazon.com/sagemaker/latest/dg/ei.html endpoint_name (str): The name of the endpoint to create (default: None). If not specified, a unique endpoint name will be created. + variant_name (string): The ``VariantName`` of this production variant + (default: 'AllTraffic'). tags (List[dict[str, str]]): The list of tags to attach to this specific endpoint. kms_key (str): The ARN of the KMS key that is used to encrypt the @@ -251,7 +254,11 @@ def deploy( ) production_variant = sagemaker.production_variant( - self.name, instance_type, initial_instance_count, accelerator_type=accelerator_type + self.name, + instance_type, + initial_instance_count, + variant_name=variant_name, + accelerator_type=accelerator_type, ) if endpoint_name: self.endpoint_name = endpoint_name