@@ -606,6 +606,7 @@ def deploy(
606
606
model_name = None ,
607
607
kms_key = None ,
608
608
data_capture_config = None ,
609
+ tags = None ,
609
610
** kwargs
610
611
):
611
612
"""Deploy the trained model to an Amazon SageMaker endpoint and return a
@@ -639,18 +640,18 @@ def deploy(
639
640
model completes (default: True).
640
641
model_name (str): Name to use for creating an Amazon SageMaker
641
642
model. If not specified, the name of the training job is used.
642
- tags(List[dict[str, str]]): Optional. The list of tags to attach to this specific
643
- endpoint. Example:
644
- >>> tags = [{'Key': 'tagname', 'Value': 'tagvalue'}]
645
- For more information about tags, see
646
- https://boto3.amazonaws.com/v1/documentation\
647
- /api/latest/reference/services/sagemaker.html#SageMaker.Client.add_tags
648
643
kms_key (str): The ARN of the KMS key that is used to encrypt the
649
644
data on the storage volume attached to the instance hosting the
650
645
endpoint.
651
646
data_capture_config (sagemaker.model_monitor.DataCaptureConfig): Specifies
652
647
configuration related to Endpoint data capture for use with
653
648
Amazon SageMaker Model Monitoring. Default: None.
649
+ tags(List[dict[str, str]]): Optional. The list of tags to attach to this specific
650
+ endpoint. Example:
651
+ >>> tags = [{'Key': 'tagname', 'Value': 'tagvalue'}]
652
+ For more information about tags, see
653
+ https://boto3.amazonaws.com/v1/documentation\
654
+ /api/latest/reference/services/sagemaker.html#SageMaker.Client.add_tags
654
655
**kwargs: Passed to invocation of ``create_model()``.
655
656
Implementations may customize ``create_model()`` to accept
656
657
``**kwargs`` to customize model creation during deploy.
@@ -685,7 +686,7 @@ def deploy(
685
686
accelerator_type = accelerator_type ,
686
687
endpoint_name = endpoint_name ,
687
688
update_endpoint = update_endpoint ,
688
- tags = self .tags ,
689
+ tags = tags or self .tags ,
689
690
wait = wait ,
690
691
kms_key = kms_key ,
691
692
data_capture_config = data_capture_config ,
0 commit comments