Skip to content

Commit a1c520c

Browse files
authored
change: add 1p algorithm support for me-south-1 (#97)
* change: add 1p algorithm support for me-south-1 * fix typo
1 parent 3251e7a commit a1c520c

File tree

6 files changed

+43
-2
lines changed

6 files changed

+43
-2
lines changed

sagemaker-spark-sdk/src/main/scala/com/amazonaws/services/sagemaker/sparksdk/algorithms/ImageURIProvider.scala

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@ private[algorithms] object SagerMakerRegionAccountMaps {
5050
Regions.AP_EAST_1.getName -> "286214385809",
5151
Regions.SA_EAST_1.getName -> "855470959533",
5252
Regions.EU_NORTH_1.getName -> "669576153137",
53-
Regions.EU_WEST_3.getName -> "749696950732"
53+
Regions.EU_WEST_3.getName -> "749696950732",
54+
Regions.EU_WEST_3.getName -> "749696950732",
55+
Regions.ME_SOUTH_1.getName -> "249704162688"
5456
)
5557

5658
// For LDA
@@ -90,7 +92,9 @@ private[algorithms] object SagerMakerRegionAccountMaps {
9092
Regions.AP_EAST_1.getName -> "286214385809",
9193
Regions.SA_EAST_1.getName -> "855470959533",
9294
Regions.EU_NORTH_1.getName -> "669576153137",
93-
Regions.EU_WEST_3.getName -> "749696950732"
95+
Regions.EU_WEST_3.getName -> "749696950732",
96+
Regions.EU_WEST_3.getName -> "749696950732",
97+
Regions.ME_SOUTH_1.getName -> "249704162688"
9498
)
9599
}
96100

sagemaker-spark-sdk/src/test/scala/com/amazonaws/services/sagemaker/sparksdk/algorithms/FactorizationMachinesSageMakerEstimatorTests.scala

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,11 @@ class FactorizationMachinesSageMakerEstimatorTests extends FlatSpec with Mockito
146146
createFactorizationMachinesBinaryClassifier(region = Regions.EU_WEST_3.getName)
147147
assert(estimatorEUWest3.trainingImage ==
148148
"749696950732.dkr.ecr.eu-west-3.amazonaws.com/factorization-machines:1")
149+
150+
val estimatorMESouth1 =
151+
createFactorizationMachinesBinaryClassifier(region = Regions.ME_SOUTH_1.getName)
152+
assert(estimatorMESouth1.trainingImage ==
153+
"249704162688.dkr.ecr.me-south-1.amazonaws.com/factorization-machines:1")
149154
}
150155

151156
it should "use the correct defaults for regressor" in {
@@ -243,6 +248,11 @@ class FactorizationMachinesSageMakerEstimatorTests extends FlatSpec with Mockito
243248
createFactorizationMachinesRegressor(region = Regions.EU_WEST_3.getName)
244249
assert(estimatorEUWest3.trainingImage ==
245250
"749696950732.dkr.ecr.eu-west-3.amazonaws.com/factorization-machines:1")
251+
252+
val estimatorMESouth1 =
253+
createFactorizationMachinesRegressor(region = Regions.ME_SOUTH_1.getName)
254+
assert(estimatorMESouth1.trainingImage ==
255+
"249704162688.dkr.ecr.me-south-1.amazonaws.com/factorization-machines:1")
246256
}
247257

248258
it should "setFeatureDim" in {

sagemaker-spark-sdk/src/test/scala/com/amazonaws/services/sagemaker/sparksdk/algorithms/KMeansSageMakerEstimatorTests.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,10 @@ class KMeansSageMakerEstimatorTests extends FlatSpec with Matchers with MockitoS
124124
val estimatorEUWest3 = createKMeansEstimator(region = Regions.EU_WEST_3.getName)
125125
assert(estimatorEUWest3.trainingImage ==
126126
"749696950732.dkr.ecr.eu-west-3.amazonaws.com/kmeans:1")
127+
128+
val estimatorMESouth1 = createKMeansEstimator(region = Regions.ME_SOUTH_1.getName)
129+
assert(estimatorMESouth1.trainingImage ==
130+
"249704162688.dkr.ecr.me-south-1.amazonaws.com/kmeans:1")
127131
}
128132

129133
it should "setK" in {

sagemaker-spark-sdk/src/test/scala/com/amazonaws/services/sagemaker/sparksdk/algorithms/LinearLearnerSageMakerEstimatorTests.scala

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,11 @@ class LinearLearnerSageMakerEstimatorTests extends FlatSpec with MockitoSugar {
151151
createLinearLearnerBinaryClassifier(region = Regions.EU_WEST_3.getName)
152152
assert(estimatorEUWest3.trainingImage ==
153153
"749696950732.dkr.ecr.eu-west-3.amazonaws.com/linear-learner:1")
154+
155+
val estimatorMESouth1 =
156+
createLinearLearnerBinaryClassifier(region = Regions.ME_SOUTH_1.getName)
157+
assert(estimatorMESouth1.trainingImage ==
158+
"249704162688.dkr.ecr.me-south-1.amazonaws.com/linear-learner:1")
154159
}
155160

156161
it should "use the correct defaults for multiclass classifier" in {
@@ -251,6 +256,11 @@ class LinearLearnerSageMakerEstimatorTests extends FlatSpec with MockitoSugar {
251256
createLinearLearnerMultiClassClassifier(region = Regions.EU_WEST_3.getName)
252257
assert(estimatorEUWest3.trainingImage ==
253258
"749696950732.dkr.ecr.eu-west-3.amazonaws.com/linear-learner:1")
259+
260+
val estimatorMESouth1 =
261+
createLinearLearnerMultiClassClassifier(region = Regions.ME_SOUTH_1.getName)
262+
assert(estimatorMESouth1.trainingImage ==
263+
"249704162688.dkr.ecr.me-south-1.amazonaws.com/linear-learner:1")
254264
}
255265

256266
it should "use the correct defaults for regressor" in {
@@ -347,6 +357,11 @@ class LinearLearnerSageMakerEstimatorTests extends FlatSpec with MockitoSugar {
347357
createLinearLearnerRegressor(region = Regions.EU_WEST_3.getName)
348358
assert(estimatorEUWest3.trainingImage ==
349359
"749696950732.dkr.ecr.eu-west-3.amazonaws.com/linear-learner:1")
360+
361+
val estimatorMESouth1 =
362+
createLinearLearnerRegressor(region = Regions.ME_SOUTH_1.getName)
363+
assert(estimatorMESouth1.trainingImage ==
364+
"249704162688.dkr.ecr.me-south-1.amazonaws.com/linear-learner:1")
350365
}
351366

352367
it should "setFeatureDim" in {

sagemaker-spark-sdk/src/test/scala/com/amazonaws/services/sagemaker/sparksdk/algorithms/PCASageMakerEstimatorTests.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ class PCASageMakerEstimatorTests extends FlatSpec with MockitoSugar {
104104
val estimatorEUWest3 = createPCAEstimator(region = Regions.EU_WEST_3.getName)
105105
assert(estimatorEUWest3.trainingImage ==
106106
"749696950732.dkr.ecr.eu-west-3.amazonaws.com/pca:1")
107+
108+
val estimatorMESouth1 = createPCAEstimator(region = Regions.ME_SOUTH_1.getName)
109+
assert(estimatorMESouth1.trainingImage ==
110+
"249704162688.dkr.ecr.me-south-1.amazonaws.com/pca:1")
107111
}
108112

109113
it should "use the correct defaults" in {

sagemaker-spark-sdk/src/test/scala/com/amazonaws/services/sagemaker/sparksdk/algorithms/XGBoostSageMakerEstimatorTests.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,10 @@ class XGBoostSageMakerEstimatorTests extends FlatSpec with Matchers with Mockito
123123
val estimatorEUWest3 = createXGBoostEstimator(region = Regions.EU_WEST_3.getName)
124124
assert(estimatorEUWest3.trainingImage ==
125125
"749696950732.dkr.ecr.eu-west-3.amazonaws.com/xgboost:1")
126+
127+
val estimatorMESouth1 = createXGBoostEstimator(region = Regions.ME_SOUTH_1.getName)
128+
assert(estimatorMESouth1.trainingImage ==
129+
"249704162688.dkr.ecr.me-south-1.amazonaws.com/xgboost:1")
126130
}
127131

128132
it should "setBooster" in {

0 commit comments

Comments
 (0)