Skip to content

Commit 1c4c058

Browse files
committed
fix: integ test only in supported regions
1 parent d9c8588 commit 1c4c058

File tree

2 files changed

+24
-3
lines changed

2 files changed

+24
-3
lines changed

tests/integ/sagemaker/jumpstart/estimator/test_jumpstart_estimator.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
from sagemaker.jumpstart.constants import JUMPSTART_DEFAULT_REGION_NAME
1919

2020
from sagemaker.jumpstart.estimator import JumpStartEstimator
21+
import tests
2122
from tests.integ.sagemaker.jumpstart.constants import (
2223
ENV_VAR_JUMPSTART_SDK_TEST_SUITE_ID,
2324
JUMPSTART_TAG,
@@ -32,6 +33,15 @@
3233

3334
MAX_INIT_TIME_SECONDS = 5
3435

36+
GATED_TRAINING_MODEL_SUPPORTED_REGIONS = {
37+
"us-west-2",
38+
"us-east-1",
39+
"eu-west-1",
40+
"ap-southeast-1",
41+
"us-east-2",
42+
"ap-southeast-2",
43+
}
44+
3545

3646
def test_jumpstart_estimator(setup):
3747

@@ -67,6 +77,10 @@ def test_jumpstart_estimator(setup):
6777

6878
# instance capacity errors require retries
6979
@pytest.mark.flaky(reruns=5, reruns_delay=60)
80+
@pytest.mark.skipif(
81+
tests.integ.test_region() not in GATED_TRAINING_MODEL_SUPPORTED_REGIONS,
82+
reason=f"JumpStart gated training models unavailable in {tests.integ.test_region()}.",
83+
)
7084
def test_gated_model_training(setup):
7185

7286
model_id, model_version = "meta-textgeneration-llama-2-7b", "*"

tests/integ/sagemaker/jumpstart/model/test_jumpstart_model.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,14 @@
3333

3434
MAX_INIT_TIME_SECONDS = 5
3535

36-
MODEL_PACKAGE_ARN_SUPPORTED_REGIONS = {"us-west-2", "us-east-1"}
36+
GATED_INFERENCE_MODEL_SUPPORTED_REGIONS = {
37+
"us-west-2",
38+
"us-east-1",
39+
"eu-west-1",
40+
"ap-southeast-1",
41+
"us-east-2",
42+
"ap-southeast-2",
43+
}
3744

3845

3946
def test_non_prepacked_jumpstart_model(setup):
@@ -80,8 +87,8 @@ def test_prepacked_jumpstart_model(setup):
8087

8188

8289
@pytest.mark.skipif(
83-
tests.integ.test_region() not in MODEL_PACKAGE_ARN_SUPPORTED_REGIONS,
84-
reason=f"JumpStart Model Package models unavailable in {tests.integ.test_region()}.",
90+
tests.integ.test_region() not in GATED_INFERENCE_MODEL_SUPPORTED_REGIONS,
91+
reason=f"JumpStart gated inference models unavailable in {tests.integ.test_region()}.",
8592
)
8693
def test_model_package_arn_jumpstart_model(setup):
8794

0 commit comments

Comments
 (0)