Skip to content

Commit 71e5364

Browse files
Increase the integration test timeout. (#18)
1 parent 09cab9c commit 71e5364

5 files changed

+8
-13
lines changed

Diff for: tests/integ/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@
1515
import os
1616

1717
DATA_DIR = os.path.join(os.path.dirname(__file__), "..", "data")
18-
DEFAULT_TIMEOUT_MINUTES = 10
18+
DEFAULT_TIMEOUT_MINUTES = 25

Diff for: tests/integ/test_inference_pipeline.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
# Constants
3636
BASE_NAME = 'inference-pipeline-integtest'
3737
COMPRESSED_NPY_DATA = 'mnist.npy.gz'
38-
CREATE_ENDPOINT_TIMEOUT_MINUTES = 20
3938

4039
# Fixtures
4140
@pytest.fixture(scope="module")
@@ -88,7 +87,7 @@ def test_inference_pipeline_framework(
8887
inputs):
8988
bucket_name = sagemaker_session.default_bucket()
9089
unique_name = '{}-{}'.format(BASE_NAME, datetime.now().strftime('%Y%m%d%H%M%S'))
91-
with timeout(minutes=CREATE_ENDPOINT_TIMEOUT_MINUTES):
90+
with timeout(minutes=DEFAULT_TIMEOUT_MINUTES):
9291
pipeline = InferencePipeline(
9392
preprocessor=sklearn_preprocessor,
9493
estimator=sklearn_estimator,

Diff for: tests/integ/test_sagemaker_steps.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
INSTANCE_COUNT = 1
4646
INSTANCE_TYPE = "ml.m5.large"
4747

48-
CREATE_ENDPOINT_TIMEOUT_MINUTES = 20
4948

5049
@pytest.fixture(scope="module")
5150
def trained_estimator(pca_estimator_fixture, record_set_fixture):
@@ -224,7 +223,7 @@ def test_create_endpoint_step(trained_estimator, record_set_fixture, sfn_client,
224223
endpoint_step = EndpointStep('create_endpoint_step', endpoint_name=endpoint_name, endpoint_config_name=model.name)
225224
workflow_graph = Chain([endpoint_step])
226225

227-
with timeout(minutes=CREATE_ENDPOINT_TIMEOUT_MINUTES):
226+
with timeout(minutes=DEFAULT_TIMEOUT_MINUTES):
228227
# Create workflow and check definition
229228
workflow = create_workflow_and_check_definition(
230229
workflow_graph=workflow_graph,
@@ -279,7 +278,7 @@ def test_tuning_step(sfn_client, record_set_for_hyperparameter_tuning, sagemaker
279278
tuning_step = TuningStep('Tuning', tuner=tuner, job_name=job_name, data=record_set_for_hyperparameter_tuning)
280279
workflow_graph = Chain([tuning_step])
281280

282-
with timeout(minutes=CREATE_ENDPOINT_TIMEOUT_MINUTES):
281+
with timeout(minutes=DEFAULT_TIMEOUT_MINUTES):
283282
# Create workflow and check definition
284283
workflow = create_workflow_and_check_definition(
285284
workflow_graph=workflow_graph,

Diff for: tests/integ/test_training_pipeline_estimators.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@
4242

4343
# Constants
4444
BASE_NAME = 'training-pipeline-integtest'
45-
CREATE_ENDPOINT_TIMEOUT_MINUTES = 20
4645

4746

4847
# Fixtures
@@ -80,7 +79,7 @@ def test_pca_estimator(sfn_client, sagemaker_session, sagemaker_role_arn, sfn_ro
8079
unique_name = '{}-{}'.format(BASE_NAME, datetime.now().strftime('%Y%m%d%H%M%S'))
8180
hyperparams = pca_estimator.hyperparameters()
8281

83-
with timeout(minutes=CREATE_ENDPOINT_TIMEOUT_MINUTES):
82+
with timeout(minutes=DEFAULT_TIMEOUT_MINUTES):
8483
tp = TrainingPipeline(
8584
estimator=pca_estimator,
8685
role=sfn_role_arn,

Diff for: tests/integ/test_training_pipeline_framework_estimator.py

+3-5
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import sagemaker
1717
import os
1818

19-
from tests.integ import DATA_DIR
19+
from tests.integ import DATA_DIR, DEFAULT_TIMEOUT_MINUTES
2020
from tests.integ.timeout import timeout
2121
from stepfunctions.template import TrainingPipeline
2222
from sagemaker.pytorch import PyTorch
@@ -29,8 +29,6 @@
2929
get_resource_name_from_arn
3030
)
3131

32-
PIPELINE_TIMEOUT_LIMIT = 20
33-
3432
@pytest.fixture(scope="module")
3533
def torch_estimator(sagemaker_role_arn):
3634
script_path = os.path.join(DATA_DIR, "pytorch_mnist", "mnist.py")
@@ -88,7 +86,7 @@ def _pipeline_teardown(sfn_client, sagemaker_session, endpoint_name, pipeline):
8886

8987

9088
def test_torch_training_pipeline(sfn_client, sagemaker_client, torch_estimator, sagemaker_session, sfn_role_arn):
91-
with timeout(minutes=PIPELINE_TIMEOUT_LIMIT):
89+
with timeout(minutes=DEFAULT_TIMEOUT_MINUTES):
9290
# upload input data
9391
data_path = os.path.join(DATA_DIR, "pytorch_mnist")
9492
inputs = sagemaker_session.upload_data(
@@ -123,7 +121,7 @@ def test_torch_training_pipeline(sfn_client, sagemaker_client, torch_estimator,
123121

124122

125123
def test_sklearn_training_pipeline(sfn_client, sagemaker_client, sklearn_estimator, sagemaker_session, sfn_role_arn):
126-
with timeout(minutes=PIPELINE_TIMEOUT_LIMIT):
124+
with timeout(minutes=DEFAULT_TIMEOUT_MINUTES):
127125
# upload input data
128126
data_path = os.path.join(DATA_DIR, "sklearn_mnist")
129127
inputs = sagemaker_session.upload_data(

0 commit comments

Comments
 (0)