Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 057361c

Browse files
committedJul 16, 2020
change: add remaining Amazon algorithms for image_uris.retrieve()
1 parent bd28ca3 commit 057361c

19 files changed

+711
-2
lines changed
 
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"scope": ["inference", "training"],
3+
"versions": {
4+
"1": {
5+
"registries": {
6+
"ap-east-1": "286214385809",
7+
"ap-northeast-1": "501404015308",
8+
"ap-northeast-2": "306986355934",
9+
"ap-south-1": "991648021394",
10+
"ap-southeast-1": "475088953585",
11+
"ap-southeast-2": "544295431143",
12+
"ca-central-1": "469771592824",
13+
"cn-north-1": "390948362332",
14+
"cn-northwest-1": "387376663083",
15+
"eu-central-1": "813361260812",
16+
"eu-north-1": "669576153137",
17+
"eu-west-1": "685385470294",
18+
"eu-west-2": "644912444149",
19+
"eu-west-3": "749696950732",
20+
"me-south-1": "249704162688",
21+
"sa-east-1": "855470959533",
22+
"us-east-1": "811284229777",
23+
"us-east-2": "825641698319",
24+
"us-gov-west-1": "226302683700",
25+
"us-iso-east-1": "490574956308",
26+
"us-west-1": "632365934929",
27+
"us-west-2": "433757028032"
28+
},
29+
"repository": "blazingtext"
30+
}
31+
}
32+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"scope": ["inference", "training"],
3+
"versions": {
4+
"1": {
5+
"registries": {
6+
"ap-east-1": "286214385809",
7+
"ap-northeast-1": "633353088612",
8+
"ap-northeast-2": "204372634319",
9+
"ap-south-1": "991648021394",
10+
"ap-southeast-1": "475088953585",
11+
"ap-southeast-2": "514117268639",
12+
"ca-central-1": "469771592824",
13+
"cn-north-1": "390948362332",
14+
"cn-northwest-1": "387376663083",
15+
"eu-central-1": "495149712605",
16+
"eu-north-1": "669576153137",
17+
"eu-west-1": "224300973850",
18+
"eu-west-2": "644912444149",
19+
"eu-west-3": "749696950732",
20+
"me-south-1": "249704162688",
21+
"sa-east-1": "855470959533",
22+
"us-east-1": "522234722520",
23+
"us-east-2": "566113047672",
24+
"us-gov-west-1": "226302683700",
25+
"us-iso-east-1": "490574956308",
26+
"us-west-1": "632365934929",
27+
"us-west-2": "156387875391"
28+
},
29+
"repository": "forecasting-deepar"
30+
}
31+
}
32+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"scope": ["inference", "training"],
3+
"versions": {
4+
"latest": {
5+
"registries": {
6+
"ap-east-1": "110948597952",
7+
"ap-northeast-1": "941853720454",
8+
"ap-northeast-2": "151534178276",
9+
"ap-south-1": "763008648453",
10+
"ap-southeast-1": "324986816169",
11+
"ap-southeast-2": "355873309152",
12+
"ca-central-1": "464438896020",
13+
"cn-north-1": "472730292857",
14+
"cn-northwest-1": "474822919863",
15+
"eu-central-1": "746233611703",
16+
"eu-north-1": "601324751636",
17+
"eu-west-1": "802834080501",
18+
"eu-west-2": "205493899709",
19+
"eu-west-3": "254080097072",
20+
"me-south-1": "836785723513",
21+
"sa-east-1": "756306329178",
22+
"us-east-1": "785573368785",
23+
"us-east-2": "007439368137",
24+
"us-gov-west-1": "263933020539",
25+
"us-west-1": "710691900526",
26+
"us-west-2": "301217895009"
27+
},
28+
"repository": "image-classification-neo"
29+
}
30+
}
31+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"scope": ["inference", "training"],
3+
"versions": {
4+
"1": {
5+
"registries": {
6+
"ap-east-1": "286214385809",
7+
"ap-northeast-1": "501404015308",
8+
"ap-northeast-2": "306986355934",
9+
"ap-south-1": "991648021394",
10+
"ap-southeast-1": "475088953585",
11+
"ap-southeast-2": "544295431143",
12+
"ca-central-1": "469771592824",
13+
"cn-north-1": "390948362332",
14+
"cn-northwest-1": "387376663083",
15+
"eu-central-1": "813361260812",
16+
"eu-north-1": "669576153137",
17+
"eu-west-1": "685385470294",
18+
"eu-west-2": "644912444149",
19+
"eu-west-3": "749696950732",
20+
"me-south-1": "249704162688",
21+
"sa-east-1": "855470959533",
22+
"us-east-1": "811284229777",
23+
"us-east-2": "825641698319",
24+
"us-gov-west-1": "226302683700",
25+
"us-iso-east-1": "490574956308",
26+
"us-west-1": "632365934929",
27+
"us-west-2": "433757028032"
28+
},
29+
"repository": "image-classification"
30+
}
31+
}
32+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"scope": ["inference", "training"],
3+
"versions": {
4+
"1": {
5+
"registries": {
6+
"ap-east-1": "286214385809",
7+
"ap-northeast-1": "351501993468",
8+
"ap-northeast-2": "835164637446",
9+
"ap-south-1": "991648021394",
10+
"ap-southeast-1": "475088953585",
11+
"ap-southeast-2": "712309505854",
12+
"ca-central-1": "469771592824",
13+
"cn-north-1": "390948362332",
14+
"cn-northwest-1": "387376663083",
15+
"eu-central-1": "664544806723",
16+
"eu-north-1": "669576153137",
17+
"eu-west-1": "438346466558",
18+
"eu-west-2": "644912444149",
19+
"eu-west-3": "749696950732",
20+
"me-south-1": "249704162688",
21+
"sa-east-1": "855470959533",
22+
"us-east-1": "382416733822",
23+
"us-east-2": "404615174143",
24+
"us-gov-west-1": "226302683700",
25+
"us-iso-east-1": "490574956308",
26+
"us-west-1": "632365934929",
27+
"us-west-2": "174872318107"
28+
},
29+
"repository": "ipinsights"
30+
}
31+
}
32+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"scope": ["inference", "training"],
3+
"versions": {
4+
"1": {
5+
"registries": {
6+
"ap-east-1": "286214385809",
7+
"ap-northeast-1": "351501993468",
8+
"ap-northeast-2": "835164637446",
9+
"ap-south-1": "991648021394",
10+
"ap-southeast-1": "475088953585",
11+
"ap-southeast-2": "712309505854",
12+
"ca-central-1": "469771592824",
13+
"cn-north-1": "390948362332",
14+
"cn-northwest-1": "387376663083",
15+
"eu-central-1": "664544806723",
16+
"eu-north-1": "669576153137",
17+
"eu-west-1": "438346466558",
18+
"eu-west-2": "644912444149",
19+
"eu-west-3": "749696950732",
20+
"me-south-1": "249704162688",
21+
"sa-east-1": "855470959533",
22+
"us-east-1": "382416733822",
23+
"us-east-2": "404615174143",
24+
"us-gov-west-1": "226302683700",
25+
"us-iso-east-1": "490574956308",
26+
"us-west-1": "632365934929",
27+
"us-west-2": "174872318107"
28+
},
29+
"repository": "kmeans"
30+
}
31+
}
32+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"scope": ["inference", "training"],
3+
"versions": {
4+
"1": {
5+
"registries": {
6+
"ap-east-1": "286214385809",
7+
"ap-northeast-1": "351501993468",
8+
"ap-northeast-2": "835164637446",
9+
"ap-south-1": "991648021394",
10+
"ap-southeast-1": "475088953585",
11+
"ap-southeast-2": "712309505854",
12+
"ca-central-1": "469771592824",
13+
"cn-north-1": "390948362332",
14+
"cn-northwest-1": "387376663083",
15+
"eu-central-1": "664544806723",
16+
"eu-north-1": "669576153137",
17+
"eu-west-1": "438346466558",
18+
"eu-west-2": "644912444149",
19+
"eu-west-3": "749696950732",
20+
"me-south-1": "249704162688",
21+
"sa-east-1": "855470959533",
22+
"us-east-1": "382416733822",
23+
"us-east-2": "404615174143",
24+
"us-gov-west-1": "226302683700",
25+
"us-iso-east-1": "490574956308",
26+
"us-west-1": "632365934929",
27+
"us-west-2": "174872318107"
28+
},
29+
"repository": "knn"
30+
}
31+
}
32+
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"scope": ["inference", "training"],
3+
"versions": {
4+
"1": {
5+
"registries": {
6+
"ap-northeast-1": "258307448986",
7+
"ap-northeast-2": "293181348795",
8+
"ap-south-1": "991648021394",
9+
"ap-southeast-1": "475088953585",
10+
"ap-southeast-2": "297031611018",
11+
"ca-central-1": "469771592824",
12+
"eu-central-1": "353608530281",
13+
"eu-west-1": "999678624901",
14+
"eu-west-2": "644912444149",
15+
"us-east-1": "766337827248",
16+
"us-east-2": "999911452149",
17+
"us-gov-west-1": "226302683700",
18+
"us-iso-east-1": "490574956308",
19+
"us-west-1": "632365934929",
20+
"us-west-2": "266724342769"
21+
},
22+
"repository": "lda"
23+
}
24+
}
25+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"scope": ["inference", "training"],
3+
"versions": {
4+
"1": {
5+
"registries": {
6+
"ap-east-1": "286214385809",
7+
"ap-northeast-1": "351501993468",
8+
"ap-northeast-2": "835164637446",
9+
"ap-south-1": "991648021394",
10+
"ap-southeast-1": "475088953585",
11+
"ap-southeast-2": "712309505854",
12+
"ca-central-1": "469771592824",
13+
"cn-north-1": "390948362332",
14+
"cn-northwest-1": "387376663083",
15+
"eu-central-1": "664544806723",
16+
"eu-north-1": "669576153137",
17+
"eu-west-1": "438346466558",
18+
"eu-west-2": "644912444149",
19+
"eu-west-3": "749696950732",
20+
"me-south-1": "249704162688",
21+
"sa-east-1": "855470959533",
22+
"us-east-1": "382416733822",
23+
"us-east-2": "404615174143",
24+
"us-gov-west-1": "226302683700",
25+
"us-iso-east-1": "490574956308",
26+
"us-west-1": "632365934929",
27+
"us-west-2": "174872318107"
28+
},
29+
"repository": "linear-learner"
30+
}
31+
}
32+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"scope": ["inference", "training"],
3+
"versions": {
4+
"1": {
5+
"registries": {
6+
"ap-east-1": "286214385809",
7+
"ap-northeast-1": "351501993468",
8+
"ap-northeast-2": "835164637446",
9+
"ap-south-1": "991648021394",
10+
"ap-southeast-1": "475088953585",
11+
"ap-southeast-2": "712309505854",
12+
"ca-central-1": "469771592824",
13+
"cn-north-1": "390948362332",
14+
"cn-northwest-1": "387376663083",
15+
"eu-central-1": "664544806723",
16+
"eu-north-1": "669576153137",
17+
"eu-west-1": "438346466558",
18+
"eu-west-2": "644912444149",
19+
"eu-west-3": "749696950732",
20+
"me-south-1": "249704162688",
21+
"sa-east-1": "855470959533",
22+
"us-east-1": "382416733822",
23+
"us-east-2": "404615174143",
24+
"us-gov-west-1": "226302683700",
25+
"us-iso-east-1": "490574956308",
26+
"us-west-1": "632365934929",
27+
"us-west-2": "174872318107"
28+
},
29+
"repository": "ntm"
30+
}
31+
}
32+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"scope": ["inference", "training"],
3+
"versions": {
4+
"1": {
5+
"registries": {
6+
"ap-east-1": "286214385809",
7+
"ap-northeast-1": "501404015308",
8+
"ap-northeast-2": "306986355934",
9+
"ap-south-1": "991648021394",
10+
"ap-southeast-1": "475088953585",
11+
"ap-southeast-2": "544295431143",
12+
"ca-central-1": "469771592824",
13+
"cn-north-1": "390948362332",
14+
"cn-northwest-1": "387376663083",
15+
"eu-central-1": "813361260812",
16+
"eu-north-1": "669576153137",
17+
"eu-west-1": "685385470294",
18+
"eu-west-2": "644912444149",
19+
"eu-west-3": "749696950732",
20+
"me-south-1": "249704162688",
21+
"sa-east-1": "855470959533",
22+
"us-east-1": "811284229777",
23+
"us-east-2": "825641698319",
24+
"us-gov-west-1": "226302683700",
25+
"us-iso-east-1": "490574956308",
26+
"us-west-1": "632365934929",
27+
"us-west-2": "433757028032"
28+
},
29+
"repository": "object-detection"
30+
}
31+
}
32+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"scope": ["inference", "training"],
3+
"versions": {
4+
"1": {
5+
"registries": {
6+
"ap-east-1": "286214385809",
7+
"ap-northeast-1": "351501993468",
8+
"ap-northeast-2": "835164637446",
9+
"ap-south-1": "991648021394",
10+
"ap-southeast-1": "475088953585",
11+
"ap-southeast-2": "712309505854",
12+
"ca-central-1": "469771592824",
13+
"cn-north-1": "390948362332",
14+
"cn-northwest-1": "387376663083",
15+
"eu-central-1": "664544806723",
16+
"eu-north-1": "669576153137",
17+
"eu-west-1": "438346466558",
18+
"eu-west-2": "644912444149",
19+
"eu-west-3": "749696950732",
20+
"me-south-1": "249704162688",
21+
"sa-east-1": "855470959533",
22+
"us-east-1": "382416733822",
23+
"us-east-2": "404615174143",
24+
"us-gov-west-1": "226302683700",
25+
"us-iso-east-1": "490574956308",
26+
"us-west-1": "632365934929",
27+
"us-west-2": "174872318107"
28+
},
29+
"repository": "object2vec"
30+
}
31+
}
32+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"scope": ["inference", "training"],
3+
"versions": {
4+
"1": {
5+
"registries": {
6+
"ap-east-1": "286214385809",
7+
"ap-northeast-1": "351501993468",
8+
"ap-northeast-2": "835164637446",
9+
"ap-south-1": "991648021394",
10+
"ap-southeast-1": "475088953585",
11+
"ap-southeast-2": "712309505854",
12+
"ca-central-1": "469771592824",
13+
"cn-north-1": "390948362332",
14+
"cn-northwest-1": "387376663083",
15+
"eu-central-1": "664544806723",
16+
"eu-north-1": "669576153137",
17+
"eu-west-1": "438346466558",
18+
"eu-west-2": "644912444149",
19+
"eu-west-3": "749696950732",
20+
"me-south-1": "249704162688",
21+
"sa-east-1": "855470959533",
22+
"us-east-1": "382416733822",
23+
"us-east-2": "404615174143",
24+
"us-gov-west-1": "226302683700",
25+
"us-iso-east-1": "490574956308",
26+
"us-west-1": "632365934929",
27+
"us-west-2": "174872318107"
28+
},
29+
"repository": "pca"
30+
}
31+
}
32+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"scope": ["inference", "training"],
3+
"versions": {
4+
"1": {
5+
"registries": {
6+
"ap-east-1": "286214385809",
7+
"ap-northeast-1": "351501993468",
8+
"ap-northeast-2": "835164637446",
9+
"ap-south-1": "991648021394",
10+
"ap-southeast-1": "475088953585",
11+
"ap-southeast-2": "712309505854",
12+
"ca-central-1": "469771592824",
13+
"cn-north-1": "390948362332",
14+
"cn-northwest-1": "387376663083",
15+
"eu-central-1": "664544806723",
16+
"eu-north-1": "669576153137",
17+
"eu-west-1": "438346466558",
18+
"eu-west-2": "644912444149",
19+
"eu-west-3": "749696950732",
20+
"me-south-1": "249704162688",
21+
"sa-east-1": "855470959533",
22+
"us-east-1": "382416733822",
23+
"us-east-2": "404615174143",
24+
"us-gov-west-1": "226302683700",
25+
"us-iso-east-1": "490574956308",
26+
"us-west-1": "632365934929",
27+
"us-west-2": "174872318107"
28+
},
29+
"repository": "randomcutforest"
30+
}
31+
}
32+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"scope": ["inference", "training"],
3+
"versions": {
4+
"1": {
5+
"registries": {
6+
"ap-east-1": "286214385809",
7+
"ap-northeast-1": "501404015308",
8+
"ap-northeast-2": "306986355934",
9+
"ap-south-1": "991648021394",
10+
"ap-southeast-1": "475088953585",
11+
"ap-southeast-2": "544295431143",
12+
"ca-central-1": "469771592824",
13+
"cn-north-1": "390948362332",
14+
"cn-northwest-1": "387376663083",
15+
"eu-central-1": "813361260812",
16+
"eu-north-1": "669576153137",
17+
"eu-west-1": "685385470294",
18+
"eu-west-2": "644912444149",
19+
"eu-west-3": "749696950732",
20+
"me-south-1": "249704162688",
21+
"sa-east-1": "855470959533",
22+
"us-east-1": "811284229777",
23+
"us-east-2": "825641698319",
24+
"us-gov-west-1": "226302683700",
25+
"us-iso-east-1": "490574956308",
26+
"us-west-1": "632365934929",
27+
"us-west-2": "433757028032"
28+
},
29+
"repository": "semantic-segmentation"
30+
}
31+
}
32+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"scope": ["inference", "training"],
3+
"versions": {
4+
"1": {
5+
"registries": {
6+
"ap-east-1": "286214385809",
7+
"ap-northeast-1": "501404015308",
8+
"ap-northeast-2": "306986355934",
9+
"ap-south-1": "991648021394",
10+
"ap-southeast-1": "475088953585",
11+
"ap-southeast-2": "544295431143",
12+
"ca-central-1": "469771592824",
13+
"cn-north-1": "390948362332",
14+
"cn-northwest-1": "387376663083",
15+
"eu-central-1": "813361260812",
16+
"eu-north-1": "669576153137",
17+
"eu-west-1": "685385470294",
18+
"eu-west-2": "644912444149",
19+
"eu-west-3": "749696950732",
20+
"me-south-1": "249704162688",
21+
"sa-east-1": "855470959533",
22+
"us-east-1": "811284229777",
23+
"us-east-2": "825641698319",
24+
"us-gov-west-1": "226302683700",
25+
"us-iso-east-1": "490574956308",
26+
"us-west-1": "632365934929",
27+
"us-west-2": "433757028032"
28+
},
29+
"repository": "seq2seq"
30+
}
31+
}
32+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"scope": ["inference", "training"],
3+
"versions": {
4+
"latest": {
5+
"registries": {
6+
"ap-east-1": "110948597952",
7+
"ap-northeast-1": "941853720454",
8+
"ap-northeast-2": "151534178276",
9+
"ap-south-1": "763008648453",
10+
"ap-southeast-1": "324986816169",
11+
"ap-southeast-2": "355873309152",
12+
"ca-central-1": "464438896020",
13+
"cn-north-1": "472730292857",
14+
"cn-northwest-1": "474822919863",
15+
"eu-central-1": "746233611703",
16+
"eu-north-1": "601324751636",
17+
"eu-west-1": "802834080501",
18+
"eu-west-2": "205493899709",
19+
"eu-west-3": "254080097072",
20+
"me-south-1": "836785723513",
21+
"sa-east-1": "756306329178",
22+
"us-east-1": "785573368785",
23+
"us-east-2": "007439368137",
24+
"us-gov-west-1": "263933020539",
25+
"us-west-1": "710691900526",
26+
"us-west-2": "301217895009"
27+
},
28+
"repository": "xgboost-neo"
29+
}
30+
}
31+
}

‎tests/unit/sagemaker/image_uris/test_algos.py

Lines changed: 116 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,28 @@
1212
# language governing permissions and limitations under the License.
1313
from __future__ import absolute_import
1414

15+
import pytest
16+
1517
from sagemaker import image_uris
1618
from tests.unit.sagemaker.image_uris import expected_uris, regions
1719

20+
ALGO_NAMES = (
21+
"blazingtext",
22+
"factorization-machines",
23+
"forecasting-deepar",
24+
"image-classification",
25+
"ipinsights",
26+
"kmeans",
27+
"knn",
28+
"linear-learner",
29+
"ntm",
30+
"object-detection",
31+
"object2vec",
32+
"pca",
33+
"randomcutforest",
34+
"semantic-segmentation",
35+
"seq2seq",
36+
)
1837
ALGO_REGIONS_AND_ACCOUNTS = (
1938
{
2039
"algorithms": (
@@ -53,6 +72,86 @@
5372
"us-west-2": "174872318107",
5473
},
5574
},
75+
{
76+
"algorithms": ("lda",),
77+
"accounts": {
78+
"ap-northeast-1": "258307448986",
79+
"ap-northeast-2": "293181348795",
80+
"ap-south-1": "991648021394",
81+
"ap-southeast-1": "475088953585",
82+
"ap-southeast-2": "297031611018",
83+
"ca-central-1": "469771592824",
84+
"eu-central-1": "353608530281",
85+
"eu-west-1": "999678624901",
86+
"eu-west-2": "644912444149",
87+
"us-east-1": "766337827248",
88+
"us-east-2": "999911452149",
89+
"us-gov-west-1": "226302683700",
90+
"us-iso-east-1": "490574956308",
91+
"us-west-1": "632365934929",
92+
"us-west-2": "266724342769",
93+
},
94+
},
95+
{
96+
"algorithms": ("forecasting-deepar",),
97+
"accounts": {
98+
"ap-east-1": "286214385809",
99+
"ap-northeast-1": "633353088612",
100+
"ap-northeast-2": "204372634319",
101+
"ap-south-1": "991648021394",
102+
"ap-southeast-1": "475088953585",
103+
"ap-southeast-2": "514117268639",
104+
"ca-central-1": "469771592824",
105+
"cn-north-1": "390948362332",
106+
"cn-northwest-1": "387376663083",
107+
"eu-central-1": "495149712605",
108+
"eu-north-1": "669576153137",
109+
"eu-west-1": "224300973850",
110+
"eu-west-2": "644912444149",
111+
"eu-west-3": "749696950732",
112+
"me-south-1": "249704162688",
113+
"sa-east-1": "855470959533",
114+
"us-east-1": "522234722520",
115+
"us-east-2": "566113047672",
116+
"us-gov-west-1": "226302683700",
117+
"us-iso-east-1": "490574956308",
118+
"us-west-1": "632365934929",
119+
"us-west-2": "156387875391",
120+
},
121+
},
122+
{
123+
"algorithms": (
124+
"seq2seq",
125+
"image-classification",
126+
"blazingtext",
127+
"object-detection",
128+
"semantic-segmentation",
129+
),
130+
"accounts": {
131+
"ap-east-1": "286214385809",
132+
"ap-northeast-1": "501404015308",
133+
"ap-northeast-2": "306986355934",
134+
"ap-south-1": "991648021394",
135+
"ap-southeast-1": "475088953585",
136+
"ap-southeast-2": "544295431143",
137+
"ca-central-1": "469771592824",
138+
"cn-north-1": "390948362332",
139+
"cn-northwest-1": "387376663083",
140+
"eu-central-1": "813361260812",
141+
"eu-north-1": "669576153137",
142+
"eu-west-1": "685385470294",
143+
"eu-west-2": "644912444149",
144+
"eu-west-3": "749696950732",
145+
"me-south-1": "249704162688",
146+
"sa-east-1": "855470959533",
147+
"us-east-1": "811284229777",
148+
"us-east-2": "825641698319",
149+
"us-gov-west-1": "226302683700",
150+
"us-iso-east-1": "490574956308",
151+
"us-west-1": "632365934929",
152+
"us-west-2": "433757028032",
153+
},
154+
},
56155
)
57156

58157
IMAGE_URI_FORMAT = "{}.dkr.ecr.{}.{}/{}:1"
@@ -66,11 +165,26 @@ def _accounts_for_algo(algo):
66165
return {}
67166

68167

69-
def test_factorization_machines():
70-
algo = "factorization-machines"
168+
@pytest.mark.parametrize("algo", ALGO_NAMES)
169+
def test_algo_uris(algo):
71170
accounts = _accounts_for_algo(algo)
72171

73172
for region in regions.regions():
74173
for scope in ("training", "inference"):
75174
uri = image_uris.retrieve(algo, region, image_scope=scope)
76175
assert expected_uris.algo_uri(algo, accounts[region], region) == uri
176+
177+
178+
def test_lda():
179+
algo = "lda"
180+
accounts = _accounts_for_algo(algo)
181+
182+
for region in regions.regions():
183+
for scope in ("training", "inference"):
184+
if region in accounts:
185+
uri = image_uris.retrieve(algo, region, image_scope=scope)
186+
assert expected_uris.algo_uri(algo, accounts[region], region) == uri
187+
else:
188+
with pytest.raises(ValueError) as e:
189+
image_uris.retrieve(algo, region, image_scope=scope)
190+
assert "Unsupported region: {}.".format(region) in str(e.value)
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
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+
import pytest
16+
17+
from sagemaker import image_uris
18+
from tests.unit import NEO_REGION_LIST
19+
from tests.unit.sagemaker.image_uris import expected_uris, regions
20+
21+
22+
ALGO_NAMES = ("image-classification-neo", "xgboost-neo")
23+
24+
ACCOUNTS = {
25+
"ap-east-1": "110948597952",
26+
"ap-northeast-1": "941853720454",
27+
"ap-northeast-2": "151534178276",
28+
"ap-south-1": "763008648453",
29+
"ap-southeast-1": "324986816169",
30+
"ap-southeast-2": "355873309152",
31+
"ca-central-1": "464438896020",
32+
"cn-north-1": "472730292857",
33+
"cn-northwest-1": "474822919863",
34+
"eu-central-1": "746233611703",
35+
"eu-north-1": "601324751636",
36+
"eu-west-1": "802834080501",
37+
"eu-west-2": "205493899709",
38+
"eu-west-3": "254080097072",
39+
"me-south-1": "836785723513",
40+
"sa-east-1": "756306329178",
41+
"us-east-1": "785573368785",
42+
"us-east-2": "007439368137",
43+
"us-gov-west-1": "263933020539",
44+
"us-west-1": "710691900526",
45+
"us-west-2": "301217895009",
46+
}
47+
48+
49+
@pytest.mark.parametrize("algo", ALGO_NAMES)
50+
def test_algo_uris(algo):
51+
for region in regions.regions():
52+
for scope in ("training", "inference"):
53+
if region in NEO_REGION_LIST:
54+
uri = image_uris.retrieve(algo, region, image_scope=scope)
55+
expected = expected_uris.algo_uri(algo, ACCOUNTS[region], region, version="latest")
56+
assert expected == uri
57+
else:
58+
with pytest.raises(ValueError) as e:
59+
image_uris.retrieve(algo, region, image_scope=scope)
60+
assert "Unsupported region: {}.".format(region) in str(e.value)

0 commit comments

Comments
 (0)
Please sign in to comment.