Skip to content

Commit 16e509b

Browse files
author
Chuyang Deng
committed
Address comments.
1 parent 0173ed8 commit 16e509b

File tree

2 files changed

+0
-50
lines changed

2 files changed

+0
-50
lines changed

tests/integ/test_transformer.py

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -106,46 +106,6 @@ def test_attach_transform_kmeans(sagemaker_session):
106106
attached_transformer.wait()
107107

108108

109-
# def test_transformer_delete_model(sagemaker_session):
110-
# data_path = os.path.join(DATA_DIR, 'one_p_mnist')
111-
# pickle_args = {} if sys.version_info.major == 2 else {'encoding': 'latin1'}
112-
#
113-
# train_set_path = os.path.join(data_path, 'mnist.pkl.gz')
114-
# with gzip.open(train_set_path, 'rb') as f:
115-
# train_set, _, _ = pickle.load(f, **pickle_args)
116-
#
117-
# kmeans = KMeans(role='SageMakerRole', train_instance_count=1,
118-
# train_instance_type='ml.c4.xlarge', k=10, sagemaker_session=sagemaker_session,
119-
# output_path='s3://{}/'.format(sagemaker_session.default_bucket()))
120-
#
121-
# kmeans.init_method = 'random'
122-
# kmeans.max_iterations = 1
123-
# kmeans.tol = 1
124-
# kmeans.num_trials = 1
125-
# kmeans.local_init_method = 'kmeans++'
126-
# kmeans.half_life_time_size = 1
127-
# kmeans.epochs = 1
128-
#
129-
# records = kmeans.record_set(train_set[0][:100])
130-
# with timeout(minutes=TRAINING_DEFAULT_TIMEOUT_MINUTES):
131-
# kmeans.fit(records)
132-
#
133-
# transform_input_path = os.path.join(data_path, 'transform_input.csv')
134-
# transform_input_key_prefix = 'integ-test-data/one_p_mnist/transform'
135-
# transform_input = kmeans.sagemaker_session.upload_data(path=transform_input_path,
136-
# key_prefix=transform_input_key_prefix)
137-
#
138-
# transformer = _create_transformer_and_transform_job(kmeans, transform_input)
139-
# with timeout(minutes=TRANSFORM_DEFAULT_TIMEOUT_MINUTES):
140-
# transformer.wait()
141-
#
142-
# transformer.delete_model()
143-
#
144-
# with pytest.raises(Exception) as exception:
145-
# sagemaker_session.sagemaker_client.describe_model(ModelName=transformer.model_name)
146-
# assert 'Could not find model' in exception.value.message
147-
148-
149109
def test_transform_mxnet_vpc(sagemaker_session, mxnet_full_version):
150110
data_path = os.path.join(DATA_DIR, 'mxnet_mnist')
151111
script_path = os.path.join(data_path, 'mnist.py')

tests/unit/test_predictor.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -459,16 +459,6 @@ def test_delete_endpoint_with_config():
459459
sagemaker_session.delete_endpoint_config.assert_called_with('endpoint-config')
460460

461461

462-
def test_delete_non_existing_endpoint():
463-
sagemaker_session = empty_sagemaker_session()
464-
expected_error_message = 'The endpoint this config attached to does not exist.'
465-
sagemaker_session.sagemaker_client.describe_endpoint = Mock(side_effect=ValueError(expected_error_message))
466-
predictor = RealTimePredictor(ENDPOINT, sagemaker_session=sagemaker_session)
467-
468-
with pytest.raises(ValueError, match=expected_error_message):
469-
predictor.delete_endpoint()
470-
471-
472462
def test_delete_endpoint_only():
473463
sagemaker_session = empty_sagemaker_session()
474464
predictor = RealTimePredictor(ENDPOINT, sagemaker_session=sagemaker_session)

0 commit comments

Comments
 (0)