@@ -266,69 +266,3 @@ def test_deploy_predictor_cls(production_variant, sagemaker_session):
266
266
assert isinstance (predictor , sagemaker .predictor .Predictor )
267
267
assert predictor .endpoint_name == endpoint_name
268
268
assert predictor .sagemaker_session == sagemaker_session
269
-
270
-
271
- def test_deploy_update_endpoint (sagemaker_session ):
272
- model = Model (MODEL_IMAGE , MODEL_DATA , role = ROLE , sagemaker_session = sagemaker_session )
273
- model .deploy (
274
- instance_type = INSTANCE_TYPE , initial_instance_count = INSTANCE_COUNT , update_endpoint = True
275
- )
276
- sagemaker_session .create_endpoint_config .assert_called_with (
277
- name = model .name ,
278
- model_name = model .name ,
279
- initial_instance_count = INSTANCE_COUNT ,
280
- instance_type = INSTANCE_TYPE ,
281
- accelerator_type = None ,
282
- tags = None ,
283
- kms_key = None ,
284
- data_capture_config_dict = None ,
285
- )
286
- config_name = sagemaker_session .create_endpoint_config (
287
- name = model .name ,
288
- model_name = model .name ,
289
- initial_instance_count = INSTANCE_COUNT ,
290
- instance_type = INSTANCE_TYPE ,
291
- accelerator_type = ACCELERATOR_TYPE ,
292
- )
293
- sagemaker_session .update_endpoint .assert_called_with (model .name , config_name , wait = True )
294
- sagemaker_session .create_endpoint .assert_not_called ()
295
-
296
-
297
- def test_deploy_update_endpoint_optional_args (sagemaker_session ):
298
- endpoint_name = "endpoint-name"
299
- tags = [{"Key" : "Value" }]
300
- kms_key = "foo"
301
- data_capture_config = Mock ()
302
-
303
- model = Model (MODEL_IMAGE , MODEL_DATA , role = ROLE , sagemaker_session = sagemaker_session )
304
- model .deploy (
305
- instance_type = INSTANCE_TYPE ,
306
- initial_instance_count = INSTANCE_COUNT ,
307
- update_endpoint = True ,
308
- endpoint_name = endpoint_name ,
309
- accelerator_type = ACCELERATOR_TYPE ,
310
- tags = tags ,
311
- kms_key = kms_key ,
312
- wait = False ,
313
- data_capture_config = data_capture_config ,
314
- )
315
- sagemaker_session .create_endpoint_config .assert_called_with (
316
- name = model .name ,
317
- model_name = model .name ,
318
- initial_instance_count = INSTANCE_COUNT ,
319
- instance_type = INSTANCE_TYPE ,
320
- accelerator_type = ACCELERATOR_TYPE ,
321
- tags = tags ,
322
- kms_key = kms_key ,
323
- data_capture_config_dict = data_capture_config ._to_request_dict (),
324
- )
325
- config_name = sagemaker_session .create_endpoint_config (
326
- name = model .name ,
327
- model_name = model .name ,
328
- initial_instance_count = INSTANCE_COUNT ,
329
- instance_type = INSTANCE_TYPE ,
330
- accelerator_type = ACCELERATOR_TYPE ,
331
- wait = False ,
332
- )
333
- sagemaker_session .update_endpoint .assert_called_with (endpoint_name , config_name , wait = False )
334
- sagemaker_session .create_endpoint .assert_not_called ()
0 commit comments