Skip to content

Commit b348bdc

Browse files
committed
Fixes
1 parent a60925c commit b348bdc

File tree

2 files changed

+11
-19
lines changed

2 files changed

+11
-19
lines changed

tests/integ/sagemaker/experiments/helpers.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,11 @@ def cleanup_exp_resources(exp_names, sagemaker_session):
4444
exp = Experiment.load(experiment_name=exp_name, sagemaker_session=sagemaker_session)
4545
exp._delete_all(action="--force")
4646

47+
4748
@pytest.fixture
4849
def clear_run_context():
4950
current_run = _RunContext.get_current_run()
50-
if current_run == None:
51+
if current_run is None:
5152
return
5253

5354
logging.info(

tests/integ/sagemaker/serve/test_serve_mlflow_pytorch_flavor_happy.py

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
import os
1919
import io
2020
import numpy as np
21-
from sagemaker import image_uris
2221

2322
from sagemaker.lineage.artifact import Artifact
2423
from sagemaker.lineage.association import Association
@@ -44,7 +43,7 @@
4443

4544
logger = logging.getLogger(__name__)
4645

47-
ROLE_NAME = "SageMakerRole"
46+
ROLE_NAME = "Admin"
4847

4948

5049
@pytest.fixture
@@ -167,9 +166,9 @@ def model_builder(request):
167166
# ), f"{caught_ex} was thrown when running pytorch squeezenet local container test"
168167

169168

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",
173172
)
174173
def test_happy_pytorch_sagemaker_endpoint_with_torch_serve(
175174
sagemaker_session,
@@ -197,14 +196,6 @@ def test_happy_pytorch_sagemaker_endpoint_with_torch_serve(
197196
)
198197

199198
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-
),
208199
mode=Mode.SAGEMAKER_ENDPOINT,
209200
schema_builder=squeezenet_schema,
210201
role_arn=role_arn,
@@ -236,10 +227,10 @@ def test_happy_pytorch_sagemaker_endpoint_with_torch_serve(
236227
except Exception as e:
237228
caught_ex = e
238229
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+
)
244235
if caught_ex:
245236
raise caught_ex

0 commit comments

Comments
 (0)