@@ -208,9 +208,9 @@ def test_model_builder_happy_path_with_task_provided_remote_schema_mode(
208
208
)
209
209
@pytest .mark .parametrize (
210
210
"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 " )],
212
212
)
213
- def test_model_builder_happy_path_with_task_provided_remote_schema_mode_asr (
213
+ def test_model_builder_with_task_provided_remote_schema_mode_asr (
214
214
model_id , task_provided , sagemaker_session , instance_type_provided
215
215
):
216
216
model_builder = ModelBuilder (
@@ -228,34 +228,6 @@ def test_model_builder_happy_path_with_task_provided_remote_schema_mode_asr(
228
228
assert model_builder .schema_builder .sample_input == inputs
229
229
assert model_builder .schema_builder .sample_output == outputs
230
230
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
-
259
231
260
232
def test_model_builder_negative_path_with_invalid_task (sagemaker_session ):
261
233
model_builder = ModelBuilder (
0 commit comments