Skip to content

Commit 33901c9

Browse files
authored
Fix S3 bucket not found
- Create shallow canary marker for eu-south-2, ap-southeast-3, me-central-1, eu-central-2, since some registries are not available in those regions. - Add training and hosting to shallow canary - Add `--region ` for `aws s3 sync` to prevent error when downloading s3 bucket data to temp directory. - Remove dependency on `s3://sagemaker-sample-data-$AWS_REGION ` By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent 724b24c commit 33901c9

File tree

5 files changed

+23
-15
lines changed

5 files changed

+23
-15
lines changed

test/e2e/replacement_values.py

+19-12
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,6 @@
7575
"eu-south-1": "563282790590.dkr.ecr.eu-south-1.amazonaws.com",
7676
"ap-northeast-3": "479947661362.dkr.ecr.ap-northeast-3.amazonaws.com",
7777
"af-south-1": "314341159256.dkr.ecr.af-south-1.amazonaws.com",
78-
"eu-south-2": "",
79-
"ap-southeast-3": "",
80-
"me-central-1": "",
81-
"eu-central-2": "",
8278
}
8379

8480
# https://docs.aws.amazon.com/sagemaker/latest/dg/sagemaker-algo-docker-registry-paths.html
@@ -136,7 +132,7 @@
136132
"sa-east-1": "763104351884.dkr.ecr.sa-east-1.amazonaws.com",
137133
"cn-north-1": "727897471807.dkr.ecr.cn-north-1.amazonaws.com.cn",
138134
"cn-northwest-1": "727897471807.dkr.ecr.cn-northwest-1.amazonaws.com.cn",
139-
"ap-northeast-3": "364406365360.dkr.ecr.ap-northeast-3.amazonaws.com",
135+
"ap-northeast-3": "364406365360.dkr.ecr.ap-northeast-3.amazonaws.com",
140136
"eu-south-2": "503227376785.dkr.ecr.eu-south-2.amazonaws.com",
141137
"ap-southeast-3": "907027046896.dkr.ecr.ap-southeast-3.amazonaws.com",
142138
"me-central-1": "914824155844.dkr.ecr.me-central-1.amazonaws.com",
@@ -170,9 +166,6 @@
170166
"us-gov-west-1": "362178532790.dkr.ecr.us-gov-west-1.amazonaws.com",
171167
"ap-northeast-3": "990339680094.dkr.ecr.ap-northeast-3.amazonaws.com",
172168
"ap-southeast-3": "669540362728.dkr.ecr.ap-southeast-3.amazonaws.com",
173-
"eu-south-2": "",
174-
"me-central-1": "",
175-
"eu-central-2": "",
176169
}
177170

178171
# https://docs.aws.amazon.com/sagemaker/latest/dg/clarify-configure-processing-jobs.html#clarify-processing-job-configure-container
@@ -199,9 +192,6 @@
199192
"eu-south-1": "638885417683.dkr.ecr.eu-south-1.amazonaws.com",
200193
"ap-northeast-3": "912233562940.dkr.ecr.ap-northeast-3.amazonaws.com",
201194
"ap-southeast-3": "705930551576.dkr.ecr.ap-southeast-3.amazonaws.com",
202-
"eu-south-2": "",
203-
"me-central-1": "",
204-
"eu-central-2": "",
205195
}
206196

207197
ENDPOINT_INSTANCE_TYPES = {
@@ -212,11 +202,28 @@
212202
TRAINING_JOB_INSTANCE_TYPES = {
213203
"eu-west-3": "ml.m5.xlarge",
214204
"eu-north-1": "ml.m5.xlarge",
215-
"me-south-1": "ml.m5.xlarge",
205+
"ap-northeast-3": "ml.m5.xlarge",
206+
"ap-east-1": "ml.m5.xlarge",
207+
"me-south-1": "ml.m5.xlarge",
208+
"eu-south-1": "ml.m5.xlarge",
209+
"af-south-1": "ml.m5.xlarge",
210+
"eu-south-2": "ml.m5.xlarge",
211+
"ap-southeast-3": "ml.m5.xlarge",
212+
"me-central-1": "ml.m5.xlarge",
213+
"eu-central-2": "ml.m5.xlarge",
216214
}
217215

218216
NOTEBOOK_INSTANCE_INSTANCE_TYPES = {
219217
"eu-north-1": "ml.t3.medium",
218+
"ap-northeast-3": "ml.t3.medium",
219+
"ap-east-1": "ml.t3.medium",
220+
"me-south-1": "ml.t3.medium",
221+
"eu-south-1": "ml.t3.medium",
222+
"af-south-1": "ml.t3.medium",
223+
"eu-south-2": "ml.t3.medium",
224+
"ap-southeast-3": "ml.t3.medium",
225+
"me-central-1": "ml.t3.medium",
226+
"eu-central-2": "ml.t3.medium",
220227
}
221228

222229
REPLACEMENT_VALUES = {

test/e2e/resources/kmeans_processingjob.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ spec:
2121
processingInputs:
2222
- inputName: mnist_tar
2323
s3Input:
24-
s3URI: s3://sagemaker-sample-data-$AWS_REGION/algorithms/kmeans/mnist/mnist.pkl.gz
24+
s3URI: s3://$SAGEMAKER_DATA_BUCKET/sagemaker/processing/algorithms/kmeans/mnist/mnist.pkl.gz
2525
localPath: /opt/ml/processing/input
2626
s3DataType: S3Prefix
2727
s3InputMode: File

test/e2e/resources/pipeline_processing.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ spec:
77
pipelineName: $PIPELINE_NAME
88
pipelineDefinition: '{"Version": "2020-12-01", "Metadata": {}, "Parameters": [{"Name": "ProcessingInstanceType",
99
"Type": "String", "DefaultValue": "ml.m5.xlarge"}, {"Name": "ProcessingInstanceCount", "Type": "Integer", "DefaultValue": 1},
10-
{"Name": "InputData", "Type": "String", "DefaultValue": "s3://sagemaker-sample-data-$AWS_REGION/algorithms/kmeans/mnist/mnist.pkl.gz"}],
10+
{"Name": "InputData", "Type": "String", "DefaultValue": "s3://$SAGEMAKER_DATA_BUCKET/sagemaker/processing/algorithms/kmeans/mnist/mnist.pkl.gz"}],
1111
"PipelineExperimentConfig": {"ExperimentName": {"Get": "Execution.PipelineName"}, "TrialName": {"Get": "Execution.PipelineExecutionId"}},
1212
"Steps": [{"Name": "PreprocessData", "Type": "Processing", "Arguments": {"ProcessingResources":
1313
{"ClusterConfig": {"InstanceType": "ml.m5.large", "InstanceCount": {"Get": "Parameters.ProcessingInstanceCount"}, "VolumeSizeInGB": 20}},

test/e2e/service_bootstrap.py

+2
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ def sync_data_bucket(bucket) -> str:
5555
"sync",
5656
f"s3://{SAGEMAKER_SOURCE_DATA_BUCKET}",
5757
f"./{temp_dir}/",
58+
"--region",
59+
"us-west-2",
5860
"--quiet",
5961
]
6062
)

test/e2e/tests/test_endpoint_config.py

-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ def single_variant_config():
7474

7575

7676
@service_marker
77-
@pytest.mark.shallow_canary
7877
@pytest.mark.canary
7978
class TestEndpointConfig:
8079
def test_create_endpoint_config(self, single_variant_config):

0 commit comments

Comments
 (0)