Skip to content

Commit 7c02a32

Browse files
authored
Merge branch 'master' into feature/new_fg_utils
2 parents dcea6d4 + 4d95b05 commit 7c02a32

File tree

4 files changed

+138
-1
lines changed

4 files changed

+138
-1
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{
2+
"scope": ["inference"],
3+
"versions": {
4+
"0.20.0": {
5+
"registries": {
6+
"af-south-1": "626614931356",
7+
"ap-east-1": "871362719292",
8+
"ap-northeast-1": "763104351884",
9+
"ap-northeast-2": "763104351884",
10+
"ap-northeast-3": "364406365360",
11+
"ap-south-1": "763104351884",
12+
"ap-southeast-1": "763104351884",
13+
"ap-southeast-2": "763104351884",
14+
"ap-southeast-3": "907027046896",
15+
"ca-central-1": "763104351884",
16+
"cn-north-1": "727897471807",
17+
"cn-northwest-1": "727897471807",
18+
"eu-central-1": "763104351884",
19+
"eu-north-1": "763104351884",
20+
"eu-west-1": "763104351884",
21+
"eu-west-2": "763104351884",
22+
"eu-west-3": "763104351884",
23+
"eu-south-1": "692866216735",
24+
"me-south-1": "217643126080",
25+
"sa-east-1": "763104351884",
26+
"us-east-1": "763104351884",
27+
"us-east-2": "763104351884",
28+
"us-west-1": "763104351884",
29+
"us-west-2": "763104351884"
30+
},
31+
"repository": "djl-inference",
32+
"tag_prefix": "0.20.0-deepspeed0.7.5-cu116"
33+
},
34+
"0.19.0": {
35+
"registries": {
36+
"af-south-1": "626614931356",
37+
"ap-east-1": "871362719292",
38+
"ap-northeast-1": "763104351884",
39+
"ap-northeast-2": "763104351884",
40+
"ap-northeast-3": "364406365360",
41+
"ap-south-1": "763104351884",
42+
"ap-southeast-1": "763104351884",
43+
"ap-southeast-2": "763104351884",
44+
"ap-southeast-3": "907027046896",
45+
"ca-central-1": "763104351884",
46+
"cn-north-1": "727897471807",
47+
"cn-northwest-1": "727897471807",
48+
"eu-central-1": "763104351884",
49+
"eu-north-1": "763104351884",
50+
"eu-west-1": "763104351884",
51+
"eu-west-2": "763104351884",
52+
"eu-west-3": "763104351884",
53+
"eu-south-1": "692866216735",
54+
"me-south-1": "217643126080",
55+
"sa-east-1": "763104351884",
56+
"us-east-1": "763104351884",
57+
"us-east-2": "763104351884",
58+
"us-west-1": "763104351884",
59+
"us-west-2": "763104351884"
60+
},
61+
"repository": "djl-inference",
62+
"tag_prefix": "0.19.0-deepspeed0.7.3-cu113"
63+
}
64+
}
65+
}

tests/integ/sagemaker/lineage/test_artifact.py

+3-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
from sagemaker.lineage import artifact
2323
from sagemaker.utils import retry_with_backoff
2424

25+
CREATION_VERIFICATION_WINDOW_MINUTES = 2
26+
2527

2628
def test_create_delete(artifact_obj):
2729
# fixture does create and then delete, this test ensures it happens at least once
@@ -81,7 +83,7 @@ def test_list(artifact_objs, sagemaker_session):
8183

8284

8385
def test_list_by_type(artifact_objs, sagemaker_session):
84-
slack = datetime.timedelta(minutes=1)
86+
slack = datetime.timedelta(minutes=CREATION_VERIFICATION_WINDOW_MINUTES)
8587
now = datetime.datetime.now(datetime.timezone.utc)
8688
expected_name = list(
8789
filter(lambda x: x.artifact_type == "SDKIntegrationTestType2", artifact_objs)

tests/unit/sagemaker/image_uris/expected_uris.py

+6
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,9 @@ def graviton_framework_uri(
7272
tag = "-".join(x for x in (fw_version, processor, py_version, container_version) if x)
7373

7474
return IMAGE_URI_FORMAT.format(account, region, domain, repo, tag)
75+
76+
77+
def djl_framework_uri(repo, account, djl_version, primary_framework, region=REGION):
78+
domain = ALTERNATE_DOMAINS.get(region, DOMAIN)
79+
tag = f"{djl_version}-{primary_framework}"
80+
return IMAGE_URI_FORMAT.format(account, region, domain, repo, tag)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Copyright 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+
import pytest
15+
from sagemaker import image_uris
16+
from tests.unit.sagemaker.image_uris import expected_uris
17+
18+
ACCOUNTS = {
19+
"af-south-1": "626614931356",
20+
"ap-east-1": "871362719292",
21+
"ap-northeast-1": "763104351884",
22+
"ap-northeast-2": "763104351884",
23+
"ap-northeast-3": "364406365360",
24+
"ap-south-1": "763104351884",
25+
"ap-southeast-1": "763104351884",
26+
"ap-southeast-2": "763104351884",
27+
"ap-southeast-3": "907027046896",
28+
"ca-central-1": "763104351884",
29+
"cn-north-1": "727897471807",
30+
"cn-northwest-1": "727897471807",
31+
"eu-central-1": "763104351884",
32+
"eu-north-1": "763104351884",
33+
"eu-west-1": "763104351884",
34+
"eu-west-2": "763104351884",
35+
"eu-west-3": "763104351884",
36+
"eu-south-1": "692866216735",
37+
"me-south-1": "217643126080",
38+
"sa-east-1": "763104351884",
39+
"us-east-1": "763104351884",
40+
"us-east-2": "763104351884",
41+
"us-west-1": "763104351884",
42+
"us-west-2": "763104351884",
43+
}
44+
VERSIONS = ["0.20.0", "0.19.0"]
45+
DJL_FRAMEWORKS = ["djl-deepspeed"]
46+
DJL_VERSIONS_TO_FRAMEWORK = {
47+
"0.19.0": {"djl-deepspeed": "deepspeed0.7.3-cu113"},
48+
"0.20.0": {"djl-deepspeed": "deepspeed0.7.5-cu116"},
49+
}
50+
51+
52+
@pytest.mark.parametrize("region", ACCOUNTS.keys())
53+
@pytest.mark.parametrize("version", VERSIONS)
54+
@pytest.mark.parametrize("djl_framework", DJL_FRAMEWORKS)
55+
def test_djl_uris(region, version, djl_framework):
56+
uri = image_uris.retrieve(framework=djl_framework, region=region, version=version)
57+
expected = expected_uris.djl_framework_uri(
58+
"djl-inference",
59+
ACCOUNTS[region],
60+
version,
61+
DJL_VERSIONS_TO_FRAMEWORK[version][djl_framework],
62+
region,
63+
)
64+
assert expected == uri

0 commit comments

Comments
 (0)