Skip to content

Commit e45e57d

Browse files
committed
small fixes in import error
1 parent 4528b39 commit e45e57d

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

tests/integ/sagemaker/serve/constants.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
SERVE_SAGEMAKER_ENDPOINT_TIMEOUT = 15
2424
SERVE_SAVE_TIMEOUT = 2
2525

26-
PYTHON_VERSION_IS_38 = platform.python_version_tuple()[1] != "8"
27-
PYTHON_VERSION_IS_310 = platform.python_version_tuple()[1] != "10"
26+
PYTHON_VERSION_IS_NOT_38 = platform.python_version_tuple()[1] != "8"
27+
PYTHON_VERSION_IS_NOT_310 = platform.python_version_tuple()[1] != "10"
2828

2929
XGB_RESOURCE_DIR = os.path.join(DATA_DIR, "serve_resources", "xgboost")
3030
PYTORCH_SQUEEZENET_RESOURCE_DIR = os.path.join(DATA_DIR, "serve_resources", "pytorch")

tests/integ/sagemaker/serve/test_serve_js_happy.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from sagemaker.serve.builder.schema_builder import SchemaBuilder
1818
from tests.integ.sagemaker.serve.constants import (
1919
SERVE_SAGEMAKER_ENDPOINT_TIMEOUT,
20-
NOT_RUNNING_ON_PY310,
20+
PYTHON_VERSION_IS_NOT_310,
2121
)
2222

2323
from tests.integ.timeout import timeout
@@ -47,9 +47,10 @@ def happy_model_builder(sagemaker_session):
4747

4848

4949
@pytest.mark.skipif(
50-
NOT_RUNNING_ON_PY310,
50+
PYTHON_VERSION_IS_NOT_310,
5151
reason="The goal of these test are to test the serving components of our feature",
5252
)
53+
@pytest.mark.slow_test
5354
def test_happy_tgi_sagemaker_endpoint(happy_model_builder, gpu_instance_type):
5455
logger.info("Running in SAGEMAKER_ENDPOINT mode...")
5556
caught_ex = None

tests/integ/sagemaker/serve/test_serve_pt_happy.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
from tests.integ.sagemaker.serve.constants import (
2929
PYTORCH_SQUEEZENET_RESOURCE_DIR,
3030
SERVE_SAGEMAKER_ENDPOINT_TIMEOUT,
31-
PYTHON_VERSION_IS_310,
31+
PYTHON_VERSION_IS_NOT_310,
3232
)
3333
from tests.integ.timeout import timeout
3434
from tests.integ.utils import cleanup_model_resources
@@ -149,12 +149,13 @@ def model_builder(request):
149149

150150

151151
@pytest.mark.skipif(
152-
PYTHON_VERSION_IS_310,
152+
PYTHON_VERSION_IS_NOT_310,
153153
reason="The goal of these test are to test the serving components of our feature",
154154
)
155155
@pytest.mark.parametrize(
156156
"model_builder", ["model_builder_inference_spec_schema_builder"], indirect=True
157157
)
158+
@pytest.mark.slow_test
158159
def test_happy_pytorch_local_container(sagemaker_session, model_builder, test_image):
159160
logger.info("Running in LOCAL_CONTAINER mode...")
160161
caught_ex = None
@@ -180,7 +181,7 @@ def test_happy_pytorch_local_container(sagemaker_session, model_builder, test_im
180181

181182

182183
@pytest.mark.skipif(
183-
PYTHON_VERSION_IS_310, # or NOT_RUNNING_ON_INF_EXP_DEV_PIPELINE,
184+
PYTHON_VERSION_IS_NOT_310, # or NOT_RUNNING_ON_INF_EXP_DEV_PIPELINE,
184185
reason="The goal of these test are to test the serving components of our feature",
185186
)
186187
@pytest.mark.parametrize(
@@ -222,7 +223,7 @@ def test_happy_pytorch_sagemaker_endpoint(
222223

223224

224225
# @pytest.mark.skipif(
225-
# NOT_RUNNING_ON_INF_EXP_DEV_PIPELINE or PYTHON_VERSION_IS_310,
226+
# NOT_RUNNING_ON_INF_EXP_DEV_PIPELINE or PYTHON_VERSION_IS_NOT_310,
226227
# reason="The goal of these test are to test the serving components of our feature",
227228
# )
228229
# @pytest.mark.parametrize(
@@ -268,7 +269,7 @@ def test_happy_pytorch_sagemaker_endpoint(
268269

269270

270271
# @pytest.mark.skipif(
271-
# NOT_RUNNING_ON_INF_EXP_DEV_PIPELINE or PYTHON_VERSION_IS_310,
272+
# NOT_RUNNING_ON_INF_EXP_DEV_PIPELINE or PYTHON_VERSION_IS_NOT_310,
272273
# reason="The goal of these test are to test the serving components of our feature",
273274
# )
274275
# @pytest.mark.parametrize(

0 commit comments

Comments
 (0)