Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/sagemaker/huggingface/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ def deploy(
deserializer=None,
accelerator_type=None,
endpoint_name=None,
variant_name="AllTraffic",
Copy link
Member

@mufaddal-rohawala mufaddal-rohawala May 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is a new argument, can we add this at the end of argument list? This is to ensure backwards compatibility for existing usages for our customers.

tags=None,
kms_key=None,
wait=True,
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -317,6 +320,7 @@ def deploy(
deserializer,
accelerator_type,
endpoint_name,
variant_name,
tags,
kms_key,
wait,
Expand Down
4 changes: 4 additions & 0 deletions src/sagemaker/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -1190,6 +1190,7 @@ def deploy(
deserializer=None,
accelerator_type=None,
endpoint_name=None,
variant_name="AllTraffic",
tags=None,
kms_key=None,
wait=True,
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down
9 changes: 8 additions & 1 deletion src/sagemaker/multidatamodel.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@ def deploy(
deserializer=None,
accelerator_type=None,
endpoint_name=None,
variant_name="AllTraffic",
tags=None,
kms_key=None,
wait=True,
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down