Skip to content

Commit

Permalink
change: update Sagemaker Neo regions (#1024)
Browse files Browse the repository at this point in the history
  • Loading branch information
mnuyens authored and laurenyu committed Sep 5, 2019
1 parent 3739e5b commit ded3c8f
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 3 deletions.
14 changes: 13 additions & 1 deletion src/sagemaker/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,23 @@
NEO_ALLOWED_FRAMEWORKS = set(["mxnet", "tensorflow", "pytorch", "onnx", "xgboost"])

NEO_IMAGE_ACCOUNT = {
"us-west-1": "710691900526",
"us-west-2": "301217895009",
"us-east-1": "785573368785",
"eu-west-1": "802834080501",
"us-east-2": "007439368137",
"eu-west-1": "802834080501",
"eu-west-2": "205493899709",
"eu-west-3": "254080097072",
"eu-central-1": "746233611703",
"eu-north-1": "601324751636",
"ap-northeast-1": "941853720454",
"ap-northeast-2": "151534178276",
"ap-east-1": "110948597952",
"ap-southeast-1": "324986816169",
"ap-southeast-2": "355873309152",
"ap-south-1": "763008648453",
"sa-east-1": "756306329178",
"ca-central-1": "464438896020",
}


Expand Down
22 changes: 20 additions & 2 deletions tests/unit/test_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -523,15 +523,33 @@ def test_check_neo_region(sagemaker_session, tmpdir):
"cn-north-1",
"cn-northwest-1",
"eu-central-1",
" eu-west-1",
"eu-west-1",
"eu-west-2",
"eu-west-3",
"eu-north-1",
"sa-east-1",
"us-gov-east-1",
"us-gov-west-1",
]
neo_support_region = ["us-west-2", "eu-west-1", "us-east-1", "us-east-2", "ap-northeast-1"]
neo_support_region = [
"us-west-1",
"us-west-2",
"us-east-1",
"us-east-2",
"eu-west-1",
"eu-west-2",
"eu-west-3",
"eu-central-1",
"eu-north-1",
"ap-northeast-1",
"ap-northeast-2",
"ap-east-1",
"ap-south-1",
"ap-southeast-1",
"ap-southeast-2",
"sa-east-1",
"ca-central-1",
]
for region_name in ec2_region_list:
if region_name in neo_support_region:
assert model.check_neo_region(region_name) is True
Expand Down

0 comments on commit ded3c8f

Please sign in to comment.