Skip to content

fix: only run DataParallel and EdgePackaging tests in supported regions #2023

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions tests/integ/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,18 @@
"eu-south-1",
]
NO_MODEL_MONITORING_REGIONS = ["me-south-1", "af-south-1", "eu-south-1"]
EDGE_PACKAGING_SUPPORTED_REGIONS = [
"us-east-2",
"us-west-2",
"us-east-1",
"eu-west-1",
"ap-northeast-1",
"eu-central-1",
]
# Data parallelism need to be tested with p3.16xlarge.
# The instance type is expensive and not supported in all the regions.
# Limiting the test to run in IAD and CMH
DATA_PARALLEL_TESTING_REGIONS = ["us-east-2", "us-east-1"]


EFS_TEST_ENABLED_REGION = []
Expand Down
11 changes: 10 additions & 1 deletion tests/integ/test_edge.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@
import pytest

from sagemaker.mxnet.estimator import MXNet
from tests.integ import DATA_DIR, TRAINING_DEFAULT_TIMEOUT_MINUTES
from tests.integ import (
DATA_DIR,
TRAINING_DEFAULT_TIMEOUT_MINUTES,
EDGE_PACKAGING_SUPPORTED_REGIONS,
test_region,
)
from tests.integ.timeout import timeout


Expand Down Expand Up @@ -53,6 +58,10 @@ def mxnet_training_job(
return mx.latest_training_job.name


@pytest.mark.skipif(
test_region() not in EDGE_PACKAGING_SUPPORTED_REGIONS,
reason="Edge packaging isn't supported in that specific region.",
)
def test_edge_packaging_job(mxnet_training_job, sagemaker_session):
estimator = MXNet.attach(mxnet_training_job, sagemaker_session=sagemaker_session)
model = estimator.compile_model(
Expand Down
6 changes: 6 additions & 0 deletions tests/integ/test_smdataparallel_pt.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

import os

import pytest

import sagemaker.utils
import tests.integ as integ

Expand All @@ -26,6 +28,10 @@
)


@pytest.mark.skipif(
integ.test_region() not in integ.DATA_PARALLEL_TESTING_REGIONS,
reason="Only allow this test to run in IAD and CMH to limit usage of p3.16xlarge",
)
def test_smdataparallel_pt_mnist(
sagemaker_session,
pytorch_training_latest_version,
Expand Down
6 changes: 6 additions & 0 deletions tests/integ/test_smdataparallel_tf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

import os

import pytest

import sagemaker.utils
import tests.integ as integ

Expand All @@ -25,6 +27,10 @@
)


@pytest.mark.skipif(
integ.test_region() not in integ.DATA_PARALLEL_TESTING_REGIONS,
reason="Only allow this test to run in IAD and CMH to limit usage of p3.16xlarge",
)
def test_smdataparallel_tf_mnist(
sagemaker_session,
tensorflow_training_latest_version,
Expand Down