b7222818e9dd4d33ee933388e73a11ad8d0bf89b,tests/helper_functions.py,,score_model_in_sagemaker_docker_container,#Any#Any#,24
Before Change
if ping_status.status_code != 200:
raise Exception("ping failed, server is not happy")
if type(data) == pd.DataFrame:
data = data.to_dict(orient="records")
y = requests.post(url="http://localhost:5000/invocations", json=data)
import json
return json.loads(y.content)
finally:
if proc.poll() is None:
proc.terminate()
print("captured output of the scoring process")
After Change
stdout=PIPE,
stderr=STDOUT,
universal_newlines=True, env=env)
r = _score_proc(proc, 5000, data, "json").content
import json
return json.loads(r) // TODO: we should return pd.Dataframe the same as pyfunc serve
def pyfunc_serve_and_score_model(model_path, data):
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 4
Instances Project Name: mlflow/mlflow
Commit Name: b7222818e9dd4d33ee933388e73a11ad8d0bf89b
Time: 2018-09-06
Author: 33237569+tomasatdatabricks@users.noreply.github.com
File Name: tests/helper_functions.py
Class Name:
Method Name: score_model_in_sagemaker_docker_container
Project Name: polyaxon/polyaxon
Commit Name: 2ff60edb6ff4f127259380f4fdfd703c9330a682
Time: 2018-06-26
Author: zhecongguo@linkdoc.com
File Name: polyaxon/api/experiments/serializers.py
Class Name: ExperimentDetailSerializer
Method Name: get_resources
Project Name: cesium-ml/cesium
Commit Name: 390258fe22f39a2ae916cb95a06387dfa03f47ed
Time: 2016-02-24
Author: brettnaul@gmail.com
File Name: mltsp/celery_tasks.py
Class Name:
Method Name: featurize_ts_file
Project Name: polyaxon/polyaxon
Commit Name: f3b18e9b3f7470dcfd47baa5a5aad302b0fd5e1f
Time: 2018-06-03
Author: mouradmourafiq@gmail.com
File Name: polyaxon/scheduler/spawners/dockerizer_spawner.py
Class Name: DockerizerSpawner
Method Name: start_dockerizer