@@ -208,7 +208,7 @@ def test_model_builder_happy_path_with_task_provided_remote_schema_mode(
208208)
209209@pytest .mark .parametrize (
210210 "model_id, task_provided, instance_type_provided" ,
211- [("openai/whisper-large-v3 " , "automatic-speech-recognition" , "ml.m5.xlarge " )],
211+ [("openai/whisper-tiny.en " , "automatic-speech-recognition" , "ml.m5.4xlarge " )],
212212)
213213def test_model_builder_happy_path_with_task_provided_remote_schema_mode_asr (
214214 model_id , task_provided , sagemaker_session , instance_type_provided
@@ -228,34 +228,6 @@ def test_model_builder_happy_path_with_task_provided_remote_schema_mode_asr(
228228 assert model_builder .schema_builder .sample_input == inputs
229229 assert model_builder .schema_builder .sample_output == outputs
230230
231- with timeout (minutes = SERVE_SAGEMAKER_ENDPOINT_TIMEOUT ):
232- caught_ex = None
233- try :
234- iam_client = sagemaker_session .boto_session .client ("iam" )
235- role_arn = iam_client .get_role (RoleName = "SageMakerRole" )["Role" ]["Arn" ]
236-
237- logger .info ("Deploying and predicting in SAGEMAKER_ENDPOINT mode..." )
238- predictor = model .deploy (
239- role = role_arn , instance_count = 1 , instance_type = instance_type_provided
240- )
241-
242- predicted_outputs = predictor .predict (inputs )
243- assert predicted_outputs is not None
244-
245- except Exception as e :
246- caught_ex = e
247- finally :
248- cleanup_model_resources (
249- sagemaker_session = model_builder .sagemaker_session ,
250- model_name = model .name ,
251- endpoint_name = model .endpoint_name ,
252- )
253- if caught_ex :
254- logger .exception (caught_ex )
255- assert (
256- False
257- ), f"{ caught_ex } was thrown when running transformers sagemaker endpoint test"
258-
259231
260232def test_model_builder_negative_path_with_invalid_task (sagemaker_session ):
261233 model_builder = ModelBuilder (
0 commit comments