1787f783e2f9fc4f2144bd4b4f90281a2bb018b5,tests/integ/test_inference_pipeline.py,,test_inference_pipeline_model_deploy,#Any#,33
Before Change
xgb_model_data = sagemaker_session.upload_data(
path=os.path.join(xgboost_data_path, "xgb_model.tar.gz"),
key_prefix="integ-test-data/xgboost/model")
schema = json.dumps({
"input": [
{
"name": "Pclass",
"type": "float"
},
{
"name": "Embarked",
"type": "string"
},
{
"name": "Age",
"type": "float"
},
{
"name": "Fare",
"type": "float"
},
{
"name": "SibSp",
"type": "float"
},
{
"name": "Sex",
"type": "string"
}
],
"output": {
"name": "features",
"struct": "vector",
"type": "double"
}
})
with timeout_and_delete_endpoint_by_name(endpoint_name, sagemaker_session):
sparkml_model = SparkMLModel(model_data=sparkml_model_data,
env={"SAGEMAKER_SPARKML_SCHEMA": schema},
After Change
serializer=json_serializer, content_type=CONTENT_TYPE_CSV,
accept=CONTENT_TYPE_CSV)
with open(VALID_DATA_PATH, "r") as f:
valid_data = f.read()
assert predictor.predict(valid_data) == "0.714013934135"
with open(INVALID_DATA_PATH, "r") as f:
invalid_data = f.read()
assert (predictor.predict(invalid_data) is None)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances
Project Name: aws/sagemaker-python-sdk
Commit Name: 1787f783e2f9fc4f2144bd4b4f90281a2bb018b5
Time: 2019-03-11
Author: andremoeller@users.noreply.github.com
File Name: tests/integ/test_inference_pipeline.py
Class Name:
Method Name: test_inference_pipeline_model_deploy
Project Name: NeuromorphicProcessorProject/snn_toolbox
Commit Name: 8e2dcb85db4def11e2361cc945f0331969f15b27
Time: 2017-06-24
Author: bodo.rueckauer@gmail.com
File Name: setup.py
Class Name:
Method Name:
Project Name: stellargraph/stellargraph
Commit Name: 2f3f9e2f4ae603e48d0813a691cdd5265f6e38ba
Time: 2018-08-21
Author: docherty@gmail.com
File Name: setup.py
Class Name:
Method Name: