Skip to content

Commit 3816a56

Browse files
authored
Classify canary_quick in integ tests (aws#677)
1 parent a815279 commit 3816a56

28 files changed

+31
-49
lines changed

tests/integ/test_byo_estimator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def fm_serializer(data):
4040
return json.dumps(js)
4141

4242

43-
@pytest.mark.continuous_testing
43+
@pytest.mark.canary_quick
4444
def test_byo_estimator(sagemaker_session, region):
4545
"""Use Factorization Machines algorithm as an example here.
4646

tests/integ/test_chainer_train.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def test_training_with_additional_hyperparameters(sagemaker_session, chainer_ful
6666
return chainer.latest_training_job.name
6767

6868

69-
@pytest.mark.continuous_testing
69+
@pytest.mark.canary_quick
7070
@pytest.mark.regional_testing
7171
def test_attach_deploy(chainer_training_job, sagemaker_session):
7272
endpoint_name = 'test-chainer-attach-deploy-{}'.format(sagemaker_timestamp())

tests/integ/test_factorization_machines.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,12 @@
1818
import sys
1919
import time
2020

21-
import pytest
22-
2321
from sagemaker import FactorizationMachines, FactorizationMachinesModel
2422
from sagemaker.utils import unique_name_from_base
2523
from tests.integ import DATA_DIR, TRAINING_DEFAULT_TIMEOUT_MINUTES
2624
from tests.integ.timeout import timeout, timeout_and_delete_endpoint_by_name
2725

2826

29-
@pytest.mark.continuous_testing
3027
def test_factorization_machines(sagemaker_session):
3128
with timeout(minutes=TRAINING_DEFAULT_TIMEOUT_MINUTES):
3229
data_path = os.path.join(DATA_DIR, 'one_p_mnist', 'mnist.pkl.gz')

tests/integ/test_horovod.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
horovod_dir = os.path.join(os.path.dirname(__file__), '..', 'data', 'horovod')
2828

2929

30+
@pytest.mark.canary_quick
3031
@pytest.mark.parametrize('instance_type', ['ml.c5.xlarge', 'ml.p3.2xlarge'])
3132
def test_horovod(sagemaker_session, instance_type, tmpdir):
3233

tests/integ/test_inference_pipeline.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
from sagemaker.utils import sagemaker_timestamp
2929

3030

31-
@pytest.mark.continuous_testing
31+
@pytest.mark.canary_quick
3232
@pytest.mark.regional_testing
3333
def test_inference_pipeline_model_deploy(sagemaker_session):
3434
sparkml_data_path = os.path.join(DATA_DIR, 'sparkml_model')

tests/integ/test_ipinsights.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
from __future__ import absolute_import
1414

1515
import os
16-
import pytest
1716

1817
from sagemaker import IPInsights, IPInsightsModel
1918
from sagemaker.predictor import RealTimePredictor
@@ -25,7 +24,6 @@
2524
FEATURE_DIM = None
2625

2726

28-
@pytest.mark.continuous_testing
2927
def test_ipinsights(sagemaker_session):
3028
with timeout(minutes=TRAINING_DEFAULT_TIMEOUT_MINUTES):
3129
data_path = os.path.join(DATA_DIR, 'ipinsights')

tests/integ/test_kmeans.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
from tests.integ.timeout import timeout, timeout_and_delete_endpoint_by_name
2727

2828

29-
@pytest.mark.continuous_testing
3029
def test_kmeans(sagemaker_session):
3130
with timeout(minutes=TRAINING_DEFAULT_TIMEOUT_MINUTES):
3231
data_path = os.path.join(DATA_DIR, 'one_p_mnist', 'mnist.pkl.gz')

tests/integ/test_knn.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,12 @@
1818
import sys
1919
import time
2020

21-
import pytest
22-
2321
from sagemaker import KNN, KNNModel
2422
from sagemaker.utils import unique_name_from_base
2523
from tests.integ import DATA_DIR, TRAINING_DEFAULT_TIMEOUT_MINUTES
2624
from tests.integ.timeout import timeout, timeout_and_delete_endpoint_by_name
2725

2826

29-
@pytest.mark.continuous_testing
3027
def test_knn_regressor(sagemaker_session):
3128
with timeout(minutes=TRAINING_DEFAULT_TIMEOUT_MINUTES):
3229
data_path = os.path.join(DATA_DIR, 'one_p_mnist', 'mnist.pkl.gz')

tests/integ/test_lda.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
import os
1616

1717
import numpy as np
18-
import pytest
1918

2019
from sagemaker import LDA, LDAModel
2120
from sagemaker.amazon.common import read_records
@@ -25,7 +24,6 @@
2524
from tests.integ.record_set import prepare_record_set_from_local_files
2625

2726

28-
@pytest.mark.continuous_testing
2927
def test_lda(sagemaker_session):
3028
with timeout(minutes=TRAINING_DEFAULT_TIMEOUT_MINUTES):
3129
data_path = os.path.join(DATA_DIR, 'lda')

tests/integ/test_linear_learner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
from tests.integ.timeout import timeout, timeout_and_delete_endpoint_by_name
2828

2929

30-
@pytest.mark.continuous_testing
30+
@pytest.mark.canary_quick
3131
def test_linear_learner(sagemaker_session):
3232
with timeout(minutes=TRAINING_DEFAULT_TIMEOUT_MINUTES):
3333
data_path = os.path.join(DATA_DIR, 'one_p_mnist', 'mnist.pkl.gz')

tests/integ/test_marketplace.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
import time
1818

1919
import pandas
20+
import pytest
2021

2122
import sagemaker
2223
from sagemaker import AlgorithmEstimator, ModelPackage
@@ -42,6 +43,7 @@
4243
'154230595-8f00905c1f927a512b73ea29dd09ae30'
4344

4445

46+
@pytest.mark.canary_quick
4547
def test_marketplace_estimator(sagemaker_session):
4648
with timeout(minutes=15):
4749
data_path = os.path.join(DATA_DIR, 'marketplace', 'training')
@@ -112,6 +114,7 @@ def test_marketplace_attach(sagemaker_session):
112114
print(predictor.predict(test_x.values).decode('utf-8'))
113115

114116

117+
@pytest.mark.canary_quick
115118
def test_marketplace_model(sagemaker_session):
116119

117120
def predict_wrapper(endpoint, session):

tests/integ/test_mxnet_train.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def mxnet_training_job(sagemaker_session, mxnet_full_version):
4545
return mx.latest_training_job.name
4646

4747

48-
@pytest.mark.continuous_testing
48+
@pytest.mark.canary_quick
4949
@pytest.mark.regional_testing
5050
def test_attach_deploy(mxnet_training_job, sagemaker_session):
5151
endpoint_name = 'test-mxnet-attach-deploy-{}'.format(sagemaker_timestamp())
@@ -122,7 +122,7 @@ def test_deploy_model_with_update_non_existing_endpoint(mxnet_training_job, sage
122122
model.deploy(1, 'ml.m4.xlarge', update_endpoint=True, endpoint_name='non-existing-endpoint')
123123

124124

125-
@pytest.mark.continuous_testing
125+
@pytest.mark.canary_quick
126126
@pytest.mark.regional_testing
127127
@pytest.mark.skipif(tests.integ.test_region() not in tests.integ.EI_SUPPORTED_REGIONS,
128128
reason="EI isn't supported in that specific region.")

tests/integ/test_neo_mxnet.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def mxnet_training_job(sagemaker_session, mxnet_full_version):
4444
return mx.latest_training_job.name
4545

4646

47-
@pytest.mark.continuous_testing
47+
@pytest.mark.canary_quick
4848
@pytest.mark.regional_testing
4949
@pytest.mark.skip(reason="This should be enabled along with the Boto SDK release for Neo API changes")
5050
def test_attach_deploy(mxnet_training_job, sagemaker_session):

tests/integ/test_ntm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
from tests.integ.record_set import prepare_record_set_from_local_files
2626

2727

28-
@pytest.mark.continuous_testing
28+
@pytest.mark.canary_quick
2929
def test_ntm(sagemaker_session):
3030
with timeout(minutes=TRAINING_DEFAULT_TIMEOUT_MINUTES):
3131
data_path = os.path.join(DATA_DIR, 'ntm')

tests/integ/test_object2vec.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
from __future__ import absolute_import
1414

1515
import os
16-
import pytest
1716

1817
from sagemaker.predictor import RealTimePredictor
1918
from sagemaker import Object2Vec, Object2VecModel
@@ -26,7 +25,6 @@
2625
FEATURE_NUM = None
2726

2827

29-
@pytest.mark.continuous_testing
3028
def test_object2vec(sagemaker_session):
3129
with timeout(minutes=TRAINING_DEFAULT_TIMEOUT_MINUTES):
3230
data_path = os.path.join(DATA_DIR, 'object2vec')

tests/integ/test_pca.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,12 @@
1818
import sys
1919
import time
2020

21-
import pytest
22-
2321
import sagemaker.amazon.pca
2422
from sagemaker.utils import unique_name_from_base
2523
from tests.integ import DATA_DIR, TRAINING_DEFAULT_TIMEOUT_MINUTES
2624
from tests.integ.timeout import timeout, timeout_and_delete_endpoint_by_name
2725

2826

29-
@pytest.mark.continuous_testing
3027
def test_pca(sagemaker_session):
3128
with timeout(minutes=TRAINING_DEFAULT_TIMEOUT_MINUTES):
3229
data_path = os.path.join(DATA_DIR, 'one_p_mnist', 'mnist.pkl.gz')

tests/integ/test_pytorch_train.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def fixture_training_job(sagemaker_session, pytorch_full_version):
3939
return pytorch.latest_training_job.name
4040

4141

42-
@pytest.mark.continuous_testing
42+
@pytest.mark.canary_quick
4343
@pytest.mark.regional_testing
4444
def test_sync_fit_deploy(pytorch_training_job, sagemaker_session):
4545
# TODO: add tests against local mode when it's ready to be used

tests/integ/test_randomcutforest.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,13 @@
1313
from __future__ import absolute_import
1414

1515
import numpy as np
16-
import pytest
1716

1817
from sagemaker import RandomCutForest, RandomCutForestModel
1918
from sagemaker.utils import unique_name_from_base
2019
from tests.integ import TRAINING_DEFAULT_TIMEOUT_MINUTES
2120
from tests.integ.timeout import timeout, timeout_and_delete_endpoint_by_name
2221

2322

24-
@pytest.mark.continuous_testing
2523
def test_randomcutforest(sagemaker_session):
2624
with timeout(minutes=TRAINING_DEFAULT_TIMEOUT_MINUTES):
2725
# Generate a thousand 14-dimensional datapoints.

tests/integ/test_rl.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
CPU_INSTANCE = 'ml.m4.xlarge'
2626

2727

28-
@pytest.mark.continuous_testing
28+
@pytest.mark.canary_quick
2929
@pytest.mark.skipif(PYTHON_VERSION != 'py3', reason="RL images supports only Python 3.")
3030
def test_coach_mxnet(sagemaker_session, rl_coach_full_version):
3131
estimator = _test_coach(sagemaker_session, RLFramework.MXNET, rl_coach_full_version)
@@ -89,7 +89,7 @@ def _test_coach(sagemaker_session, rl_framework, rl_coach_version):
8989
})
9090

9191

92-
@pytest.mark.continuous_testing
92+
@pytest.mark.canary_quick
9393
@pytest.mark.skipif(PYTHON_VERSION != 'py3', reason="RL images supports only Python 3.")
9494
def test_ray_tf(sagemaker_session, rl_ray_full_version):
9595
source_dir = os.path.join(DATA_DIR, 'ray_cartpole')

tests/integ/test_sklearn_train.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def test_training_with_additional_hyperparameters(sagemaker_session, sklearn_ful
5454
return sklearn.latest_training_job.name
5555

5656

57-
@pytest.mark.continuous_testing
57+
@pytest.mark.canary_quick
5858
@pytest.mark.regional_testing
5959
@pytest.mark.skipif(PYTHON_VERSION != 'py3', reason="Scikit-learn image supports only python 3.")
6060
def test_attach_deploy(sklearn_training_job, sagemaker_session):

tests/integ/test_sparkml_serving.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
from tests.integ.timeout import timeout_and_delete_endpoint_by_name
2424

2525

26-
@pytest.mark.continuous_testing
26+
@pytest.mark.canary_quick
2727
@pytest.mark.regional_testing
2828
def test_sparkml_model_deploy(sagemaker_session):
2929
# Uploads an MLeap serialized MLeap model to S3 and use that to deploy a SparkML model to perform inference

tests/integ/test_tf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def tf_training_job(sagemaker_session, tf_full_version):
5252
return estimator.latest_training_job.name
5353

5454

55-
@pytest.mark.continuous_testing
55+
@pytest.mark.canary_quick
5656
@pytest.mark.regional_testing
5757
@pytest.mark.skipif(PYTHON_VERSION != 'py2', reason="TensorFlow image supports only python 2.")
5858
def test_deploy_model(sagemaker_session, tf_training_job):
@@ -78,7 +78,7 @@ def test_deploy_model(sagemaker_session, tf_training_job):
7878
assert dict_result == list_result
7979

8080

81-
@pytest.mark.continuous_testing
81+
@pytest.mark.canary_quick
8282
@pytest.mark.regional_testing
8383
@pytest.mark.skipif(tests.integ.test_region() not in tests.integ.EI_SUPPORTED_REGIONS,
8484
reason="EI isn't supported in that specific region.")

tests/integ/test_tf_cifar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def __call__(self, data):
3434
return pickle.dumps(data, protocol=2)
3535

3636

37-
@pytest.mark.continuous_testing
37+
@pytest.mark.canary_quick
3838
@pytest.mark.skipif(tests.integ.PYTHON_VERSION != 'py2',
3939
reason="TensorFlow image supports only python 2.")
4040
@pytest.mark.skipif(tests.integ.test_region() in tests.integ.HOSTING_NO_P2_REGIONS,

tests/integ/test_tf_keras.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
from sagemaker.tensorflow import TensorFlow
2424

2525

26-
@pytest.mark.continuous_testing
26+
@pytest.mark.canary_quick
2727
@pytest.mark.skipif(tests.integ.PYTHON_VERSION != 'py2',
2828
reason="TensorFlow image supports only python 2.")
2929
@pytest.mark.skipif(tests.integ.test_region() in tests.integ.HOSTING_NO_P2_REGIONS,

tests/integ/test_tf_script_mode.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ def test_mnist(sagemaker_session, instance_type):
5252
['graph.pbtxt', 'model.ckpt-0.index', 'model.ckpt-0.meta', 'saved_model.pb'])
5353

5454

55+
@pytest.mark.canary_quick
5556
@pytest.mark.skipif(integ.PYTHON_VERSION != 'py3', reason="Script Mode tests are only configured to run with Python 3")
5657
def test_mnist_distributed(sagemaker_session, instance_type):
5758
estimator = TensorFlow(entry_point=SCRIPT,

tests/integ/test_tfs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def tfs_predictor(instance_type, sagemaker_session, tf_full_version):
4646
yield predictor
4747

4848

49-
@pytest.mark.continuous_testing
49+
@pytest.mark.canary_quick
5050
def test_predict(tfs_predictor, instance_type): # pylint: disable=W0613
5151
input_data = {'instances': [1.0, 2.0, 5.0]}
5252
expected_result = {'predictions': [3.5, 4.0, 5.5]}

tests/integ/test_transformer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
from tests.integ.vpc_test_utils import get_or_create_vpc_resources
2929

3030

31-
@pytest.mark.continuous_testing
31+
@pytest.mark.canary_quick
3232
def test_transform_mxnet(sagemaker_session, mxnet_full_version):
3333
data_path = os.path.join(DATA_DIR, 'mxnet_mnist')
3434
script_path = os.path.join(data_path, 'mnist.py')
@@ -65,7 +65,7 @@ def test_transform_mxnet(sagemaker_session, mxnet_full_version):
6565
assert kms_key_arn == job_desc['TransformResources']['VolumeKmsKeyId']
6666

6767

68-
@pytest.mark.continuous_testing
68+
@pytest.mark.canary_quick
6969
def test_attach_transform_kmeans(sagemaker_session):
7070
data_path = os.path.join(DATA_DIR, 'one_p_mnist')
7171
pickle_args = {} if sys.version_info.major == 2 else {'encoding': 'latin1'}

0 commit comments

Comments
 (0)