Skip to content

fix: fix regions for updated RL images #1805

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 2 commits into from
Aug 5, 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
3 changes: 0 additions & 3 deletions src/sagemaker/image_uri_config/coach-tensorflow.json
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,8 @@
"ap-southeast-2": "462105765813",
"ca-central-1": "462105765813",
"eu-central-1": "462105765813",
"eu-north-1": "462105765813",
"eu-west-1": "462105765813",
"eu-west-2": "462105765813",
"eu-west-3": "462105765813",
"sa-east-1": "462105765813",
"us-east-1": "462105765813",
"us-east-2": "462105765813",
"us-west-1": "462105765813",
Expand Down
3 changes: 0 additions & 3 deletions src/sagemaker/image_uri_config/ray-pytorch.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,8 @@
"ap-southeast-2": "462105765813",
"ca-central-1": "462105765813",
"eu-central-1": "462105765813",
"eu-north-1": "462105765813",
"eu-west-1": "462105765813",
"eu-west-2": "462105765813",
"eu-west-3": "462105765813",
"sa-east-1": "462105765813",
"us-east-1": "462105765813",
"us-east-2": "462105765813",
"us-west-1": "462105765813",
Expand Down
6 changes: 0 additions & 6 deletions src/sagemaker/image_uri_config/ray-tensorflow.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,8 @@
"ap-southeast-2": "462105765813",
"ca-central-1": "462105765813",
"eu-central-1": "462105765813",
"eu-north-1": "462105765813",
"eu-west-1": "462105765813",
"eu-west-2": "462105765813",
"eu-west-3": "462105765813",
"sa-east-1": "462105765813",
"us-east-1": "462105765813",
"us-east-2": "462105765813",
"us-west-1": "462105765813",
Expand All @@ -151,11 +148,8 @@
"ap-southeast-2": "462105765813",
"ca-central-1": "462105765813",
"eu-central-1": "462105765813",
"eu-north-1": "462105765813",
"eu-west-1": "462105765813",
"eu-west-2": "462105765813",
"eu-west-3": "462105765813",
"sa-east-1": "462105765813",
"us-east-1": "462105765813",
"us-east-2": "462105765813",
"us-west-1": "462105765813",
Expand Down
3 changes: 0 additions & 3 deletions src/sagemaker/image_uri_config/vw.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,8 @@
"ap-southeast-2": "462105765813",
"ca-central-1": "462105765813",
"eu-central-1": "462105765813",
"eu-north-1": "462105765813",
"eu-west-1": "462105765813",
"eu-west-2": "462105765813",
"eu-west-3": "462105765813",
"sa-east-1": "462105765813",
"us-east-1": "462105765813",
"us-east-2": "462105765813",
"us-west-1": "462105765813",
Expand Down
17 changes: 17 additions & 0 deletions tests/integ/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,28 @@
"us-west-2",
]

RL_SUPPORTED_REGIONS = (
"ap-northeast-1",
"ap-northeast-2",
"ap-south-1",
"ap-southeast-1",
"ap-southeast-2",
"ca-central-1",
"eu-central-1",
"eu-west-1",
"eu-west-2",
"us-east-1",
"us-east-2",
"us-west-1",
"us-west-2",
)

NO_LDA_REGIONS = ["eu-west-3", "eu-north-1", "sa-east-1", "ap-east-1", "me-south-1"]
NO_MARKET_PLACE_REGIONS = ["eu-west-3", "eu-north-1", "sa-east-1", "ap-east-1", "me-south-1"]
NO_AUTO_ML_REGIONS = ["sa-east-1", "me-south-1", "ap-east-1", "eu-west-3"]
NO_MODEL_MONITORING_REGIONS = ["me-south-1"]


EFS_TEST_ENABLED_REGION = []

logging.getLogger("boto3").setLevel(logging.INFO)
Expand Down
10 changes: 9 additions & 1 deletion tests/integ/test_rl.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

from sagemaker.rl import RLEstimator, RLFramework, RLToolkit
from sagemaker.utils import sagemaker_timestamp, unique_name_from_base
from tests.integ import DATA_DIR
from tests.integ import DATA_DIR, RL_SUPPORTED_REGIONS, test_region
from tests.integ.timeout import timeout, timeout_and_delete_endpoint_by_name


Expand Down Expand Up @@ -51,6 +51,10 @@ def test_coach_mxnet(sagemaker_session, coach_mxnet_latest_version, cpu_instance
assert 0 < action[0][1] < 1


@pytest.mark.skipif(
test_region() not in RL_SUPPORTED_REGIONS,
reason="Updated RL images aren't in {}".format(test_region()),
)
def test_coach_tf(sagemaker_session, coach_tensorflow_latest_version, cpu_instance_type):
estimator = _test_coach(
sagemaker_session,
Expand Down Expand Up @@ -98,6 +102,10 @@ def _test_coach(sagemaker_session, rl_framework, rl_coach_version, cpu_instance_
)


@pytest.mark.skipif(
test_region() not in RL_SUPPORTED_REGIONS,
reason="Updated RL images aren't in {}".format(test_region()),
)
@pytest.mark.canary_quick
def test_ray_tf(sagemaker_session, ray_tensorflow_latest_version, cpu_instance_type):
source_dir = os.path.join(DATA_DIR, "ray_cartpole")
Expand Down