|
| 1 | +# Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"). You |
| 4 | +# may not use this file except in compliance with the License. A copy of |
| 5 | +# the License is located at |
| 6 | +# |
| 7 | +# http://aws.amazon.com/apache2.0/ |
| 8 | +# |
| 9 | +# or in the "license" file accompanying this file. This file is |
| 10 | +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF |
| 11 | +# ANY KIND, either express or implied. See the License for the specific |
| 12 | +# language governing permissions and limitations under the License. |
| 13 | +from __future__ import absolute_import |
| 14 | + |
| 15 | +from sagemaker import image_uris |
| 16 | +from tests.unit.sagemaker.image_uris import expected_uris, regions |
| 17 | + |
| 18 | +ACCOUNTS = { |
| 19 | + "ap-east-1": "651117190479", |
| 20 | + "ap-northeast-1": "354813040037", |
| 21 | + "ap-northeast-2": "366743142698", |
| 22 | + "ap-south-1": "720646828776", |
| 23 | + "ap-southeast-1": "121021644041", |
| 24 | + "ap-southeast-2": "783357654285", |
| 25 | + "ca-central-1": "341280168497", |
| 26 | + "cn-north-1": "450853457545", |
| 27 | + "cn-northwest-1": "451049120500", |
| 28 | + "eu-central-1": "492215442770", |
| 29 | + "eu-north-1": "662702820516", |
| 30 | + "eu-west-1": "141502667606", |
| 31 | + "eu-west-2": "764974769150", |
| 32 | + "eu-west-3": "659782779980", |
| 33 | + "me-south-1": "801668240914", |
| 34 | + "sa-east-1": "737474898029", |
| 35 | + "us-east-1": "683313688378", |
| 36 | + "us-east-2": "257758044811", |
| 37 | + "us-gov-west-1": "414596584902", |
| 38 | + "us-iso-east-1": "833128469047", |
| 39 | + "us-west-1": "746614075791", |
| 40 | + "us-west-2": "246618743249", |
| 41 | +} |
| 42 | +VERSION = "2.2" |
| 43 | + |
| 44 | + |
| 45 | +def test_sparkml(): |
| 46 | + for region in regions.regions(): |
| 47 | + uri = image_uris.retrieve("sparkml-serving", region=region, version=VERSION) |
| 48 | + |
| 49 | + expected = expected_uris.algo_uri( |
| 50 | + "sagemaker-sparkml-serving", ACCOUNTS[region], region, version=VERSION |
| 51 | + ) |
| 52 | + assert expected == uri |
0 commit comments