b38e4ca3161e36d60df57dd523b2ca0119f890c8,tests/integ/test_mxnet_train.py,,test_deploy_model,#Any#Any#,63
Before Change
def test_deploy_model(mxnet_training_job, sagemaker_session):
with timeout(minutes=15):
desc = sagemaker_session.sagemaker_client.describe_training_job(TrainingJobName=mxnet_training_job)
model_data = desc["ModelArtifacts"]["S3ModelArtifacts"]
script_path = os.path.join(DATA_DIR, "mxnet_mnist", "mnist.py")
model = MXNetModel(model_data, "SageMakerRole", entry_point=script_path, sagemaker_session=sagemaker_session)
predictor = model.deploy(1, "ml.m4.xlarge", endpoint_name="test-mxnet-deploy-model-{}".format(int(time.time())))
try:
data = numpy.zeros(shape=(1, 1, 28, 28))
predictor.predict(data)
finally:
sagemaker_session.delete_endpoint(predictor.endpoint)
After Change
def test_deploy_model(mxnet_training_job, sagemaker_session):
endpoint_name = "test-mxnet-deploy-model-{}".format(int(time.time()))
with timeout_and_delete_endpoint_by_name(endpoint_name, sagemaker_session, minutes=15):
desc = sagemaker_session.sagemaker_client.describe_training_job(TrainingJobName=mxnet_training_job)
model_data = desc["ModelArtifacts"]["S3ModelArtifacts"]
script_path = os.path.join(DATA_DIR, "mxnet_mnist", "mnist.py")
model = MXNetModel(model_data, "SageMakerRole", entry_point=script_path, sagemaker_session=sagemaker_session)
predictor = model.deploy(1, "ml.m4.xlarge", endpoint_name=endpoint_name)
data = numpy.zeros(shape=(1, 1, 28, 28))
predictor.predict(data)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: aws/sagemaker-python-sdk
Commit Name: b38e4ca3161e36d60df57dd523b2ca0119f890c8
Time: 2017-12-06
Author: mvs.usp@gmail.com
File Name: tests/integ/test_mxnet_train.py
Class Name:
Method Name: test_deploy_model
Project Name: aws/sagemaker-python-sdk
Commit Name: b38e4ca3161e36d60df57dd523b2ca0119f890c8
Time: 2017-12-06
Author: mvs.usp@gmail.com
File Name: tests/integ/test_mxnet_train.py
Class Name:
Method Name: test_attach_deploy
Project Name: aws/sagemaker-python-sdk
Commit Name: b38e4ca3161e36d60df57dd523b2ca0119f890c8
Time: 2017-12-06
Author: mvs.usp@gmail.com
File Name: tests/integ/test_kmeans.py
Class Name:
Method Name: test_kmeans