Skip to content

Commit fdcd378

Browse files
jiapinwroot
authored and
root
committed
fix: disable modelbuilder mlflow local integ tests (aws#4576)
1 parent 01f01e2 commit fdcd378

File tree

2 files changed

+63
-63
lines changed

2 files changed

+63
-63
lines changed

tests/integ/sagemaker/serve/test_serve_mlflow_pytorch_flavor_happy.py

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
PYTORCH_SQUEEZENET_RESOURCE_DIR,
2929
PYTORCH_SQUEEZENET_MLFLOW_RESOURCE_DIR,
3030
SERVE_SAGEMAKER_ENDPOINT_TIMEOUT,
31-
SERVE_LOCAL_CONTAINER_TIMEOUT,
31+
# SERVE_LOCAL_CONTAINER_TIMEOUT,
3232
PYTHON_VERSION_IS_NOT_310,
3333
)
3434
from tests.integ.timeout import timeout
@@ -128,36 +128,36 @@ def model_builder(request):
128128
return request.getfixturevalue(request.param)
129129

130130

131-
@pytest.mark.skipif(
132-
PYTHON_VERSION_IS_NOT_310,
133-
reason="The goal of these test are to test the serving components of our feature",
134-
)
135-
@pytest.mark.flaky(reruns=3, reruns_delay=2)
136-
@pytest.mark.parametrize("model_builder", ["model_builder_local_builder"], indirect=True)
137-
def test_happy_mlflow_pytorch_local_container_with_torch_serve(
138-
sagemaker_session, model_builder, test_image
139-
):
140-
logger.info("Running in LOCAL_CONTAINER mode...")
141-
caught_ex = None
142-
143-
model = model_builder.build(mode=Mode.LOCAL_CONTAINER, sagemaker_session=sagemaker_session)
144-
145-
with timeout(minutes=SERVE_LOCAL_CONTAINER_TIMEOUT):
146-
try:
147-
logger.info("Deploying and predicting in LOCAL_CONTAINER mode...")
148-
predictor = model.deploy()
149-
logger.info("Local container successfully deployed.")
150-
predictor.predict(test_image)
151-
except Exception as e:
152-
logger.exception("test failed")
153-
caught_ex = e
154-
finally:
155-
if model.modes[str(Mode.LOCAL_CONTAINER)].container:
156-
model.modes[str(Mode.LOCAL_CONTAINER)].container.kill()
157-
if caught_ex:
158-
assert (
159-
False
160-
), f"{caught_ex} was thrown when running pytorch squeezenet local container test"
131+
# @pytest.mark.skipif(
132+
# PYTHON_VERSION_IS_NOT_310,
133+
# reason="The goal of these test are to test the serving components of our feature",
134+
# )
135+
# @pytest.mark.flaky(reruns=3, reruns_delay=2)
136+
# @pytest.mark.parametrize("model_builder", ["model_builder_local_builder"], indirect=True)
137+
# def test_happy_mlflow_pytorch_local_container_with_torch_serve(
138+
# sagemaker_session, model_builder, test_image
139+
# ):
140+
# logger.info("Running in LOCAL_CONTAINER mode...")
141+
# caught_ex = None
142+
#
143+
# model = model_builder.build(mode=Mode.LOCAL_CONTAINER, sagemaker_session=sagemaker_session)
144+
#
145+
# with timeout(minutes=SERVE_LOCAL_CONTAINER_TIMEOUT):
146+
# try:
147+
# logger.info("Deploying and predicting in LOCAL_CONTAINER mode...")
148+
# predictor = model.deploy()
149+
# logger.info("Local container successfully deployed.")
150+
# predictor.predict(test_image)
151+
# except Exception as e:
152+
# logger.exception("test failed")
153+
# caught_ex = e
154+
# finally:
155+
# if model.modes[str(Mode.LOCAL_CONTAINER)].container:
156+
# model.modes[str(Mode.LOCAL_CONTAINER)].container.kill()
157+
# if caught_ex:
158+
# assert (
159+
# False
160+
# ), f"{caught_ex} was thrown when running pytorch squeezenet local container test"
161161

162162

163163
@pytest.mark.skipif(

tests/integ/sagemaker/serve/test_serve_mlflow_xgboost_flavor_happy.py

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
from tests.integ.sagemaker.serve.constants import (
2626
XGBOOST_MLFLOW_RESOURCE_DIR,
2727
SERVE_SAGEMAKER_ENDPOINT_TIMEOUT,
28-
SERVE_LOCAL_CONTAINER_TIMEOUT,
28+
# SERVE_LOCAL_CONTAINER_TIMEOUT,
2929
PYTHON_VERSION_IS_NOT_310,
3030
)
3131
from tests.integ.timeout import timeout
@@ -108,37 +108,37 @@ def model_builder(request):
108108
return request.getfixturevalue(request.param)
109109

110110

111-
@pytest.mark.skipif(
112-
PYTHON_VERSION_IS_NOT_310,
113-
reason="The goal of these test are to test the serving components of our feature",
114-
)
115-
@pytest.mark.flaky(reruns=3, reruns_delay=2)
116-
@pytest.mark.parametrize("model_builder", ["model_builder_local_builder"], indirect=True)
117-
def test_happy_mlflow_xgboost_local_container_with_torch_serve(
118-
sagemaker_session, model_builder, test_data
119-
):
120-
logger.info("Running in LOCAL_CONTAINER mode...")
121-
caught_ex = None
122-
123-
model = model_builder.build(mode=Mode.LOCAL_CONTAINER, sagemaker_session=sagemaker_session)
124-
test_x, _ = test_data
125-
126-
with timeout(minutes=SERVE_LOCAL_CONTAINER_TIMEOUT):
127-
try:
128-
logger.info("Deploying and predicting in LOCAL_CONTAINER mode...")
129-
predictor = model.deploy()
130-
logger.info("Local container successfully deployed.")
131-
predictor.predict(test_x)
132-
except Exception as e:
133-
logger.exception("test failed")
134-
caught_ex = e
135-
finally:
136-
if model.modes[str(Mode.LOCAL_CONTAINER)].container:
137-
model.modes[str(Mode.LOCAL_CONTAINER)].container.kill()
138-
if caught_ex:
139-
assert (
140-
False
141-
), f"{caught_ex} was thrown when running pytorch squeezenet local container test"
111+
# @pytest.mark.skipif(
112+
# PYTHON_VERSION_IS_NOT_310,
113+
# reason="The goal of these test are to test the serving components of our feature",
114+
# )
115+
# @pytest.mark.flaky(reruns=3, reruns_delay=2)
116+
# @pytest.mark.parametrize("model_builder", ["model_builder_local_builder"], indirect=True)
117+
# def test_happy_mlflow_xgboost_local_container_with_torch_serve(
118+
# sagemaker_session, model_builder, test_data
119+
# ):
120+
# logger.info("Running in LOCAL_CONTAINER mode...")
121+
# caught_ex = None
122+
#
123+
# model = model_builder.build(mode=Mode.LOCAL_CONTAINER, sagemaker_session=sagemaker_session)
124+
# test_x, _ = test_data
125+
#
126+
# with timeout(minutes=SERVE_LOCAL_CONTAINER_TIMEOUT):
127+
# try:
128+
# logger.info("Deploying and predicting in LOCAL_CONTAINER mode...")
129+
# predictor = model.deploy()
130+
# logger.info("Local container successfully deployed.")
131+
# predictor.predict(test_x)
132+
# except Exception as e:
133+
# logger.exception("test failed")
134+
# caught_ex = e
135+
# finally:
136+
# if model.modes[str(Mode.LOCAL_CONTAINER)].container:
137+
# model.modes[str(Mode.LOCAL_CONTAINER)].container.kill()
138+
# if caught_ex:
139+
# assert (
140+
# False
141+
# ), f"{caught_ex} was thrown when running pytorch squeezenet local container test"
142142

143143

144144
@pytest.mark.skipif(

0 commit comments

Comments
 (0)