|
18 | 18 | import os
|
19 | 19 | import io
|
20 | 20 | import numpy as np
|
21 |
| -from sagemaker import image_uris |
22 | 21 |
|
23 | 22 | from sagemaker.lineage.artifact import Artifact
|
24 | 23 | from sagemaker.lineage.association import Association
|
|
44 | 43 |
|
45 | 44 | logger = logging.getLogger(__name__)
|
46 | 45 |
|
47 |
| -ROLE_NAME = "SageMakerRole" |
| 46 | +ROLE_NAME = "Admin" |
48 | 47 |
|
49 | 48 |
|
50 | 49 | @pytest.fixture
|
@@ -167,9 +166,9 @@ def model_builder(request):
|
167 | 166 | # ), f"{caught_ex} was thrown when running pytorch squeezenet local container test"
|
168 | 167 |
|
169 | 168 |
|
170 |
| -@pytest.mark.skipif( |
171 |
| - PYTHON_VERSION_IS_NOT_310, # or NOT_RUNNING_ON_INF_EXP_DEV_PIPELINE, |
172 |
| - reason="The goal of these test are to test the serving components of our feature", |
| 169 | +@pytest.mark.skip( |
| 170 | + reason="Testing against Python version 310 which is not supported anymore" |
| 171 | + " https://github.com/aws/deep-learning-containers/blob/master/available_images.md", |
173 | 172 | )
|
174 | 173 | def test_happy_pytorch_sagemaker_endpoint_with_torch_serve(
|
175 | 174 | sagemaker_session,
|
@@ -197,14 +196,6 @@ def test_happy_pytorch_sagemaker_endpoint_with_torch_serve(
|
197 | 196 | )
|
198 | 197 |
|
199 | 198 | model_builder = ModelBuilder(
|
200 |
| - image_uri=image_uris.retrieve( |
201 |
| - framework="pytorch", |
202 |
| - region=sagemaker_session.boto_region_name, |
203 |
| - version="2.2.0", # Compatible version for py310 |
204 |
| - image_scope="inference", |
205 |
| - py_version="py310", |
206 |
| - instance_type=cpu_instance_type, |
207 |
| - ), |
208 | 199 | mode=Mode.SAGEMAKER_ENDPOINT,
|
209 | 200 | schema_builder=squeezenet_schema,
|
210 | 201 | role_arn=role_arn,
|
@@ -236,10 +227,10 @@ def test_happy_pytorch_sagemaker_endpoint_with_torch_serve(
|
236 | 227 | except Exception as e:
|
237 | 228 | caught_ex = e
|
238 | 229 | finally:
|
239 |
| - # cleanup_model_resources( |
240 |
| - # sagemaker_session=model_builder.sagemaker_session, |
241 |
| - # model_name=model.name, |
242 |
| - # endpoint_name=model.endpoint_name, |
243 |
| - # ) |
| 230 | + cleanup_model_resources( |
| 231 | + sagemaker_session=model_builder.sagemaker_session, |
| 232 | + model_name=model.name, |
| 233 | + endpoint_name=model.endpoint_name, |
| 234 | + ) |
244 | 235 | if caught_ex:
|
245 | 236 | raise caught_ex
|
0 commit comments