File tree Expand file tree Collapse file tree 3 files changed +16
-1
lines changed Expand file tree Collapse file tree 3 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -200,6 +200,7 @@ def deploy(
200
200
deserializer = None ,
201
201
accelerator_type = None ,
202
202
endpoint_name = None ,
203
+ variant_name = "AllTraffic" ,
203
204
tags = None ,
204
205
kms_key = None ,
205
206
wait = True ,
@@ -251,6 +252,8 @@ def deploy(
251
252
https://docs.aws.amazon.com/sagemaker/latest/dg/ei.html
252
253
endpoint_name (str): The name of the endpoint to create (default:
253
254
None). If not specified, a unique endpoint name will be created.
255
+ variant_name (string): The ``VariantName`` of this production variant
256
+ (default: 'AllTraffic').
254
257
tags (List[dict[str, str]]): The list of tags to attach to this
255
258
specific endpoint.
256
259
kms_key (str): The ARN of the KMS key that is used to encrypt the
@@ -308,6 +311,7 @@ def deploy(
308
311
deserializer ,
309
312
accelerator_type ,
310
313
endpoint_name ,
314
+ variant_name ,
311
315
tags ,
312
316
kms_key ,
313
317
wait ,
Original file line number Diff line number Diff line change @@ -1023,6 +1023,7 @@ def deploy(
1023
1023
deserializer = None ,
1024
1024
accelerator_type = None ,
1025
1025
endpoint_name = None ,
1026
+ variant_name = "AllTraffic" ,
1026
1027
tags = None ,
1027
1028
kms_key = None ,
1028
1029
wait = True ,
@@ -1074,6 +1075,8 @@ def deploy(
1074
1075
https://docs.aws.amazon.com/sagemaker/latest/dg/ei.html
1075
1076
endpoint_name (str): The name of the endpoint to create (default:
1076
1077
None). If not specified, a unique endpoint name will be created.
1078
+ variant_name (string): The ``VariantName`` of this production variant
1079
+ (default: 'AllTraffic').
1077
1080
tags (List[dict[str, str]]): The list of tags to attach to this
1078
1081
specific endpoint.
1079
1082
kms_key (str): The ARN of the KMS key that is used to encrypt the
@@ -1166,6 +1169,7 @@ def deploy(
1166
1169
self .name ,
1167
1170
instance_type ,
1168
1171
initial_instance_count ,
1172
+ variant_name = variant_name ,
1169
1173
accelerator_type = accelerator_type ,
1170
1174
serverless_inference_config = serverless_inference_config_dict ,
1171
1175
volume_size = volume_size ,
Original file line number Diff line number Diff line change @@ -158,6 +158,7 @@ def deploy(
158
158
deserializer = None ,
159
159
accelerator_type = None ,
160
160
endpoint_name = None ,
161
+ variant_name = "AllTraffic" ,
161
162
tags = None ,
162
163
kms_key = None ,
163
164
wait = True ,
@@ -203,6 +204,8 @@ def deploy(
203
204
https://docs.aws.amazon.com/sagemaker/latest/dg/ei.html
204
205
endpoint_name (str): The name of the endpoint to create (default:
205
206
None). If not specified, a unique endpoint name will be created.
207
+ variant_name (string): The ``VariantName`` of this production variant
208
+ (default: 'AllTraffic').
206
209
tags (List[dict[str, str]]): The list of tags to attach to this
207
210
specific endpoint.
208
211
kms_key (str): The ARN of the KMS key that is used to encrypt the
@@ -250,7 +253,11 @@ def deploy(
250
253
)
251
254
252
255
production_variant = sagemaker .production_variant (
253
- self .name , instance_type , initial_instance_count , accelerator_type = accelerator_type
256
+ self .name ,
257
+ instance_type ,
258
+ initial_instance_count ,
259
+ variant_name = variant_name ,
260
+ accelerator_type = accelerator_type ,
254
261
)
255
262
if endpoint_name :
256
263
self .endpoint_name = endpoint_name
You can’t perform that action at this time.
0 commit comments