Skip to content

Commit ac88fa0

Browse files
author
Deng
committed
fix: skip pytorch ei test in unsupported regions
1 parent 4ef5386 commit ac88fa0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tests/integ/test_pytorch_train.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@ def test_deploy_model(pytorch_training_job, sagemaker_session, cpu_instance_type
120120

121121

122122
@pytest.mark.skipif(PYTHON_VERSION == "py2", reason="PyTorch EIA does not support Python 2.")
123+
@pytest.mark.skipif(
124+
tests.integ.test_region() not in tests.integ.EI_SUPPORTED_REGIONS,
125+
reason="EI isn't supported in that specific region.",
126+
)
123127
def test_deploy_model_with_accelerator(sagemaker_session, cpu_instance_type):
124128
endpoint_name = "test-pytorch-deploy-eia-{}".format(sagemaker_timestamp())
125129
model_data = sagemaker_session.upload_data(path=EIA_MODEL)
@@ -134,7 +138,7 @@ def test_deploy_model_with_accelerator(sagemaker_session, cpu_instance_type):
134138
predictor = pytorch.deploy(
135139
initial_instance_count=1,
136140
instance_type=cpu_instance_type,
137-
accelerator_type="ml.eia2.medium",
141+
accelerator_type="ml.eia1.medium",
138142
endpoint_name=endpoint_name,
139143
)
140144

0 commit comments

Comments
 (0)