15
15
import pytest
16
16
from sagemaker .serve .builder .schema_builder import SchemaBuilder
17
17
from sagemaker .serve .builder .model_builder import ModelBuilder , Mode
18
- import tests . integ
18
+
19
19
from tests .integ .sagemaker .serve .constants import (
20
20
HF_DIR ,
21
21
PYTHON_VERSION_IS_NOT_310 ,
22
22
SERVE_SAGEMAKER_ENDPOINT_TIMEOUT ,
23
23
)
24
24
25
25
from tests .integ .timeout import timeout
26
- from tests .integ .utils import cleanup_model_resources , gpu_list , retry_with_instance_list
26
+ from tests .integ .utils import cleanup_model_resources
27
27
import logging
28
28
29
29
logger = logging .getLogger (__name__ )
@@ -89,14 +89,10 @@ def model_builder(request):
89
89
90
90
91
91
@pytest .mark .skipif (
92
- PYTHON_VERSION_IS_NOT_310 ,
93
- tests .integ .test_region () in tests .integ .TRAINING_NO_P2_REGIONS
94
- and tests .integ .test_region () in tests .integ .TRAINING_NO_P3_REGIONS ,
95
- reason = "no ml.p2 or ml.p3 instances in this region" ,
92
+ PYTHON_VERSION_IS_NOT_310
96
93
)
97
- @retry_with_instance_list (gpu_list (tests .integ .test_region ()))
98
94
@pytest .mark .parametrize ("model_builder" , ["model_builder_model_schema_builder" ], indirect = True )
99
- def test_tei_sagemaker_endpoint (sagemaker_session , model_builder , model_input , ** kwargs ):
95
+ def test_tei_sagemaker_endpoint (sagemaker_session , model_builder , model_input ):
100
96
logger .info ("Running in SAGEMAKER_ENDPOINT mode..." )
101
97
caught_ex = None
102
98
@@ -111,7 +107,7 @@ def test_tei_sagemaker_endpoint(sagemaker_session, model_builder, model_input, *
111
107
try :
112
108
logger .info ("Deploying and predicting in SAGEMAKER_ENDPOINT mode..." )
113
109
predictor = model .deploy (
114
- instance_type = kwargs [ "instance_type" ] , initial_instance_count = 2
110
+ instance_type = "ml.g5.12xlarge" , initial_instance_count = 2
115
111
)
116
112
logger .info ("Endpoint successfully deployed." )
117
113
predictor .predict (model_input )
0 commit comments