@@ -316,13 +316,12 @@ def test_build_happy_path_with_sagemaker_endpoint_mode_and_byoc(
316316 mock_sageMakerEndpointMode .side_effect = lambda inference_spec , model_server : (
317317 mock_mode if inference_spec is None and model_server == ModelServer .TORCHSERVE else None
318318 )
319- mock_mode .prepare .side_effect = lambda model_path , secret_key , s3_model_data_url , sagemaker_session , image_uri , jumpstart , ** kwargs : ( # noqa E501
319+ mock_mode .prepare .side_effect = lambda model_path , s3_model_data_url , sagemaker_session , image_uri , jumpstart , ** kwargs : ( # noqa E501
320320 (
321321 model_data ,
322322 ENV_VAR_PAIR ,
323323 )
324324 if model_path == MODEL_PATH
325- and secret_key == mock_secret_key
326325 and s3_model_data_url == mock_s3_model_data_url
327326 and sagemaker_session == mock_session
328327 and image_uri == mock_image_uri
@@ -425,13 +424,12 @@ def test_build_happy_path_with_sagemaker_endpoint_mode_and_1p_dlc_as_byoc(
425424 mock_sageMakerEndpointMode .side_effect = lambda inference_spec , model_server : (
426425 mock_mode if inference_spec is None and model_server == ModelServer .TORCHSERVE else None
427426 )
428- mock_mode .prepare .side_effect = lambda model_path , secret_key , s3_model_data_url , sagemaker_session , image_uri , jumpstart , ** kwargs : ( # noqa E501
427+ mock_mode .prepare .side_effect = lambda model_path , s3_model_data_url , sagemaker_session , image_uri , jumpstart , ** kwargs : ( # noqa E501
429428 (
430429 model_data ,
431430 ENV_VAR_PAIR ,
432431 )
433432 if model_path == MODEL_PATH
434- and secret_key == mock_secret_key
435433 and s3_model_data_url == mock_s3_model_data_url
436434 and sagemaker_session == mock_session
437435 and image_uri == mock_1p_dlc_image_uri
@@ -533,13 +531,12 @@ def test_build_happy_path_with_sagemaker_endpoint_mode_and_inference_spec(
533531 if inference_spec == mock_inference_spec and model_server == ModelServer .TORCHSERVE
534532 else None
535533 )
536- mock_mode .prepare .side_effect = lambda model_path , secret_key , s3_model_data_url , sagemaker_session , image_uri , jumpstart , ** kwargs : ( # noqa E501
534+ mock_mode .prepare .side_effect = lambda model_path , s3_model_data_url , sagemaker_session , image_uri , jumpstart , ** kwargs : ( # noqa E501
537535 (
538536 model_data ,
539537 ENV_VAR_PAIR ,
540538 )
541539 if model_path == MODEL_PATH
542- and secret_key == mock_secret_key
543540 and s3_model_data_url == mock_s3_model_data_url
544541 and sagemaker_session == mock_session
545542 and image_uri == mock_image_uri
@@ -635,13 +632,12 @@ def test_build_happy_path_with_sagemakerEndpoint_mode_and_model(
635632 mock_sageMakerEndpointMode .side_effect = lambda inference_spec , model_server : (
636633 mock_mode if inference_spec is None and model_server == ModelServer .TORCHSERVE else None
637634 )
638- mock_mode .prepare .side_effect = lambda model_path , secret_key , s3_model_data_url , sagemaker_session , image_uri , jumpstart , ** kwargs : ( # noqa E501
635+ mock_mode .prepare .side_effect = lambda model_path , s3_model_data_url , sagemaker_session , image_uri , jumpstart , ** kwargs : ( # noqa E501
639636 (
640637 model_data ,
641638 ENV_VAR_PAIR ,
642639 )
643640 if model_path == MODEL_PATH
644- and secret_key == mock_secret_key
645641 and s3_model_data_url == mock_s3_model_data_url
646642 and sagemaker_session == mock_session
647643 and image_uri == mock_image_uri
@@ -745,13 +741,12 @@ def test_build_happy_path_with_sagemakerEndpoint_mode_and_xgboost_model(
745741 mock_sageMakerEndpointMode .side_effect = lambda inference_spec , model_server : (
746742 mock_mode if inference_spec is None and model_server == ModelServer .TORCHSERVE else None
747743 )
748- mock_mode .prepare .side_effect = lambda model_path , secret_key , s3_model_data_url , sagemaker_session , image_uri , jumpstart , ** kwargs : ( # noqa E501
744+ mock_mode .prepare .side_effect = lambda model_path , s3_model_data_url , sagemaker_session , image_uri , jumpstart , ** kwargs : ( # noqa E501
749745 (
750746 model_data ,
751747 ENV_VAR_PAIR ,
752748 )
753749 if model_path == MODEL_PATH
754- and secret_key == mock_secret_key
755750 and s3_model_data_url == mock_s3_model_data_url
756751 and sagemaker_session == mock_session
757752 and image_uri == mock_image_uri
@@ -973,13 +968,12 @@ def test_build_happy_path_with_localContainer_mode_overwritten_with_sagemaker_mo
973968 if inference_spec == mock_inference_spec and model_server == ModelServer .TORCHSERVE
974969 else None
975970 )
976- mock_sagemaker_endpoint_mode .prepare .side_effect = lambda model_path , secret_key , s3_model_data_url , sagemaker_session , image_uri , jumpstart , ** kwargs : ( # noqa E501
971+ mock_sagemaker_endpoint_mode .prepare .side_effect = lambda model_path , s3_model_data_url , sagemaker_session , image_uri , jumpstart , ** kwargs : ( # noqa E501
977972 (
978973 model_data ,
979974 ENV_VAR_PAIR ,
980975 )
981976 if model_path == MODEL_PATH
982- and secret_key == mock_secret_key
983977 and s3_model_data_url == mock_s3_model_data_url
984978 and sagemaker_session == mock_session
985979 and image_uri == mock_image_uri
@@ -1101,13 +1095,12 @@ def test_build_happy_path_with_sagemaker_endpoint_mode_overwritten_with_local_co
11011095 mock_sageMakerEndpointMode .side_effect = lambda inference_spec , model_server : (
11021096 mock_mode if inference_spec is None and model_server == ModelServer .TORCHSERVE else None
11031097 )
1104- mock_mode .prepare .side_effect = lambda model_path , secret_key , s3_model_data_url , sagemaker_session , image_uri , jumpstart , ** kwargs : ( # noqa E501
1098+ mock_mode .prepare .side_effect = lambda model_path , s3_model_data_url , sagemaker_session , image_uri , jumpstart , ** kwargs : ( # noqa E501
11051099 (
11061100 model_data ,
11071101 ENV_VAR_PAIR ,
11081102 )
11091103 if model_path == MODEL_PATH
1110- and secret_key == mock_secret_key
11111104 and s3_model_data_url == mock_s3_model_data_url
11121105 and sagemaker_session == mock_session
11131106 and image_uri == mock_image_uri
@@ -1129,10 +1122,9 @@ def test_build_happy_path_with_sagemaker_endpoint_mode_overwritten_with_local_co
11291122 )
11301123 mock_lc_mode .prepare .side_effect = lambda : None
11311124 mock_lc_mode .create_server .side_effect = (
1132- lambda image_uri , container_timeout_seconds , secret_key , predictor : (
1125+ lambda image_uri , container_timeout_seconds , predictor , ** kwargs : (
11331126 None
11341127 if image_uri == mock_image_uri
1135- and secret_key == mock_secret_key
11361128 and container_timeout_seconds == 60
11371129 else None
11381130 )
0 commit comments