Skip to content

Commit 6f68232

Browse files
authored
Merge branch 'master' into master
2 parents a50f41c + 4634951 commit 6f68232

File tree

7 files changed

+12
-31
lines changed

7 files changed

+12
-31
lines changed

buildspec-slowtests.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
version: 0.2
22

33
phases:
4+
pre_build:
5+
commands:
6+
- start-dockerd
7+
48
build:
59
commands:
610
- IGNORE_COVERAGE=-
711

812
# slow tests
913
- start_time=`date +%s`
10-
- execute-command-if-has-matching-changes "tox -e py38 -- tests/integ -m slow_test -n 10 --durations 0" "tests/integ" "tests/data" "tests/conftest.py" "tests/__init__.py" "src/*.py" "setup.py" "setup.cfg" "buildspec-slowtests.yml"
14+
- execute-command-if-has-matching-changes "tox -e py38 -- tests/integ -m slow_test -n 16 --durations 0" "tests/integ" "tests/data" "tests/conftest.py" "tests/__init__.py" "src/*.py" "setup.py" "setup.cfg" "buildspec-slowtests.yml"
1115
- ./ci-scripts/displaytime.sh 'py38 slow tests' $start_time

tests/data/multimodel/container/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM 142577830533.dkr.ecr.us-east-2.amazonaws.com/ubuntu:16.04
1+
FROM public.ecr.aws/ubuntu/ubuntu:18.04
22

33
# Set a docker label to advertise multi-model support on the container
44
LABEL com.amazonaws.sagemaker.capabilities.multi-models=true
@@ -15,7 +15,7 @@ RUN apt-get update && \
1515
curl \
1616
vim \
1717
&& rm -rf /var/lib/apt/lists/* \
18-
&& curl -O https://bootstrap.pypa.io/3.5/get-pip.py \
18+
&& curl -O https://bootstrap.pypa.io/get-pip.py \
1919
&& python3 get-pip.py
2020

2121
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 1

tests/integ/test_lda.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
from tests.integ.record_set import prepare_record_set_from_local_files
2727

2828

29+
@pytest.mark.slow_test
2930
@pytest.mark.skipif(
3031
tests.integ.test_region() in tests.integ.NO_LDA_REGIONS,
3132
reason="LDA image is not supported in certain regions",

tests/integ/test_model_quality_monitor.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ def test_model_quality_monitor(
230230
monitor.delete_monitoring_schedule()
231231

232232

233+
@pytest.mark.slow_test
233234
@pytest.mark.skipif(
234235
tests.integ.test_region() in tests.integ.NO_MODEL_MONITORING_REGIONS,
235236
reason="ModelMonitoring is not yet supported in this region.",

tests/integ/test_multidatamodel.py

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@
2222
import pytest
2323
from botocore.exceptions import ClientError
2424

25-
import tests
26-
2725
from sagemaker import utils
2826
from sagemaker.amazon.randomcutforest import RandomCutForest
2927
from sagemaker.deserializers import StringDeserializer
@@ -53,10 +51,6 @@ def container_image(sagemaker_session):
5351

5452
docker_client = docker.from_env()
5553

56-
# Base image pull
57-
base_image = "142577830533.dkr.ecr.us-east-2.amazonaws.com/ubuntu:16.04"
58-
docker_client.images.pull(base_image, auth_config={"username": username, "password": password})
59-
6054
# Build and tag docker image locally
6155
image, build_log = docker_client.images.build(
6256
path=os.path.join(DATA_DIR, "multimodel", "container"),
@@ -134,10 +128,6 @@ def _ecr_login(ecr_client):
134128
return username, password
135129

136130

137-
@pytest.mark.skipif(
138-
tests.integ.test_region() != "us-east-2",
139-
reason="Pulling the base image is currently limited to us-east-2.",
140-
)
141131
def test_multi_data_model_deploy_pretrained_models(
142132
container_image, sagemaker_session, cpu_instance_type
143133
):
@@ -198,10 +188,6 @@ def test_multi_data_model_deploy_pretrained_models(
198188

199189

200190
@pytest.mark.local_mode
201-
@pytest.mark.skipif(
202-
tests.integ.test_region() != "us-east-2",
203-
reason="Pulling the base image is currently limited to us-east-2.",
204-
)
205191
def test_multi_data_model_deploy_pretrained_models_local_mode(container_image, sagemaker_session):
206192
timestamp = sagemaker_timestamp()
207193
endpoint_name = "test-multimodel-endpoint-{}".format(timestamp)
@@ -262,11 +248,6 @@ def test_multi_data_model_deploy_pretrained_models_local_mode(container_image, s
262248
assert "Could not find endpoint" in str(exception.value)
263249

264250

265-
@pytest.mark.slow_test
266-
@pytest.mark.skipif(
267-
tests.integ.test_region() != "us-east-2",
268-
reason="Pulling the base image is currently limited to us-east-2.",
269-
)
270251
def test_multi_data_model_deploy_trained_model_from_framework_estimator(
271252
container_image,
272253
sagemaker_session,
@@ -381,10 +362,7 @@ def _mxnet_training_job(
381362
return mx.create_model(image_uri=container_image)
382363

383364

384-
@pytest.mark.skipif(
385-
tests.integ.test_region() != "us-east-2",
386-
reason="Pulling the base image is currently limited to us-east-2.",
387-
)
365+
@pytest.mark.slow_test
388366
def test_multi_data_model_deploy_train_model_from_amazon_first_party_estimator(
389367
container_image, sagemaker_session, cpu_instance_type
390368
):
@@ -482,11 +460,6 @@ def __rcf_training_job(
482460
return rcf_model
483461

484462

485-
@pytest.mark.slow_test
486-
@pytest.mark.skipif(
487-
tests.integ.test_region() != "us-east-2",
488-
reason="Pulling the base image is currently limited to us-east-2.",
489-
)
490463
def test_multi_data_model_deploy_pretrained_models_update_endpoint(
491464
container_image, sagemaker_session, cpu_instance_type, alternative_cpu_instance_type
492465
):

tests/integ/test_tf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ def test_mnist_distributed(
155155
)
156156

157157

158+
@pytest.mark.slow_test
158159
def test_mnist_async(sagemaker_session, cpu_instance_type, tf_full_version, tf_full_py_version):
159160
estimator = TensorFlow(
160161
entry_point=SCRIPT,

tests/integ/test_tuner.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,6 +402,7 @@ def test_tuning_kmeans_identical_dataset_algorithm_tuner_from_non_terminal_paren
402402
)
403403

404404

405+
@pytest.mark.slow_test
405406
@pytest.mark.skipif(
406407
tests.integ.test_region() in tests.integ.NO_LDA_REGIONS,
407408
reason="LDA image is not supported in certain regions",

0 commit comments

Comments
 (0)