Skip to content

Commit ab3b492

Browse files
authored
Use available instance type for notebook-instance tests selected by region (#114)
- Use different instance type for `eu-north-1` for notebook_instance test - This is because the default instance type is not available on `eu-north-1` By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent fb9b751 commit ab3b492

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

test/e2e/replacement_values.py

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,10 @@
176176
"eu-north-1": "ml.m5.xlarge",
177177
}
178178

179+
NOTEBOOK_INSTANCE_INSTANCE_TYPES = {
180+
"eu-north-1": "ml.t3.medium",
181+
}
182+
179183
REPLACEMENT_VALUES = {
180184
"SAGEMAKER_DATA_BUCKET": get_bootstrap_resources().DataBucketName,
181185
"XGBOOST_IMAGE_URI": f"{XGBOOST_IMAGE_URIS[get_region()]}/sagemaker-xgboost:1.0-1-cpu-py3",
@@ -185,6 +189,11 @@
185189
"SAGEMAKER_EXECUTION_ROLE_ARN": get_bootstrap_resources().ExecutionRoleARN,
186190
"MODEL_MONITOR_ANALYZER_IMAGE_URI": f"{MODEL_MONITOR_IMAGE_URIS[get_region()]}/sagemaker-model-monitor-analyzer",
187191
"CLARIFY_IMAGE_URI": f"{CLARIFY_IMAGE_URIS[get_region()]}/sagemaker-clarify-processing:1.0",
188-
"ENDPOINT_INSTANCE_TYPE": ENDPOINT_INSTANCE_TYPES.get(get_region(), 'ml.c5.large'),
189-
"TRAINING_JOB_INSTANCE_TYPE": TRAINING_JOB_INSTANCE_TYPES.get(get_region(), 'ml.m4.xlarge')
192+
"ENDPOINT_INSTANCE_TYPE": ENDPOINT_INSTANCE_TYPES.get(get_region(), "ml.c5.large"),
193+
"TRAINING_JOB_INSTANCE_TYPE": TRAINING_JOB_INSTANCE_TYPES.get(
194+
get_region(), "ml.m4.xlarge"
195+
),
196+
"NOTEBOOK_INSTANCE_INSTANCE_TYPES": NOTEBOOK_INSTANCE_INSTANCE_TYPES.get(
197+
get_region(), "ml.t2.medium"
198+
),
190199
}

test/e2e/resources/notebook_instance.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ kind: NotebookInstance
33
metadata:
44
name: $NOTEBOOK_INSTANCE_NAME
55
spec:
6-
instanceType: ml.t2.medium
6+
instanceType: $NOTEBOOK_INSTANCE_INSTANCE_TYPES
77
notebookInstanceName: $NOTEBOOK_INSTANCE_NAME
88
roleARN: $SAGEMAKER_EXECUTION_ROLE_ARN
99
volumeSizeInGB: 6

0 commit comments

Comments
 (0)