Skip to content

Commit 284c712

Browse files
authored
Fixing timeouts for PCA async integration test. (#78)
Execute tf_cifar test without logs to eliminate delay to detect that job has finished.
1 parent d47f6d1 commit 284c712

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

tests/integ/test_pca.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ def test_async_pca():
6666
endpoint_name = name_from_base('pca')
6767
sagemaker_session = sagemaker.Session(boto_session=boto3.Session(region_name=REGION))
6868

69-
with timeout(minutes=20):
69+
with timeout(minutes=5):
7070

7171
data_path = os.path.join(DATA_DIR, 'one_p_mnist', 'mnist.pkl.gz')
7272
pickle_args = {} if sys.version_info.major == 2 else {'encoding': 'latin1'}
@@ -88,7 +88,7 @@ def test_async_pca():
8888
print("Detached from training job. Will re-attach in 20 seconds")
8989
time.sleep(20)
9090

91-
with timeout_and_delete_endpoint_by_name(endpoint_name, sagemaker_session, minutes=20):
91+
with timeout_and_delete_endpoint_by_name(endpoint_name, sagemaker_session, minutes=35):
9292
estimator = sagemaker.amazon.pca.PCA.attach(training_job_name=training_job_name,
9393
sagemaker_session=sagemaker_session)
9494

tests/integ/test_tf_cifar.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def test_cifar(sagemaker_session):
5151
base_job_name='test-cifar')
5252

5353
inputs = estimator.sagemaker_session.upload_data(path=dataset_path, key_prefix='data/cifar10')
54-
estimator.fit(inputs)
54+
estimator.fit(inputs, logs=False)
5555
print('job succeeded: {}'.format(estimator.latest_training_job.name))
5656

5757
with timeout_and_delete_endpoint(estimator=estimator, minutes=20):

0 commit comments

Comments
 (0)