ac649bff69dbce9c4169cff5ec09d7b8da017f1c,testing/test_tf_serving.py,,main,#,33
Before Change
result = None
while True:
try:
result = str(stub.Predict(request, 10.0)) // 10 secs timeout
except Exception as e:
num_try += 1
if num_try > 10:
After Change
core_api = k8s_client.CoreV1Api(api_client)
try:
with open(args.input_path) as f:
instances = json.loads(f.read())
service = core_api.read_namespaced_service(args.service_name, args.namespace)
service_ip = service.spec.cluster_ip
model_url = "http://" + service_ip + ":8000/model/mnist:predict"
num_try = 1
result = None
while True:
try:
result = requests.post(model_url, json=instances)
assert(result.status_code == 200)
except Exception as e:
num_try += 1
if num_try > 10:
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: kubeflow/kubeflow
Commit Name: ac649bff69dbce9c4169cff5ec09d7b8da017f1c
Time: 2018-08-01
Author: lunkai@google.com
File Name: testing/test_tf_serving.py
Class Name:
Method Name: main
Project Name: GoogleCloudPlatform/PerfKitBenchmarker
Commit Name: f06010e9e5104bacbc219fde90a769151f7f031a
Time: 2018-03-08
Author: yuyantingzero@gmail.com
File Name: perfkitbenchmarker/providers/aws/aws_managed_relational_db.py
Class Name: AwsManagedRelationalDb
Method Name: _IsInstanceReady
Project Name: QUANTAXIS/QUANTAXIS
Commit Name: 3c857b194b02141ea0fb79a178c4229433430354
Time: 2017-05-08
Author: yutiansut@qq.com
File Name: QUANTAXIS/QAFetch/QATushare.py
Class Name:
Method Name: QA_fetch_get_stock_info