未验证 提交 07fb167b 编写于 作者: D Dong Daxiang 提交者: GitHub

Merge pull request #343 from guru4elephant/fix_predict_return_code

Fix predict return code
......@@ -367,7 +367,7 @@ int PredictorClient::batch_predict(
res.Clear();
if (_predictor->inference(&req, &res) != 0) {
LOG(ERROR) << "failed call predictor with req: " << req.ShortDebugString();
exit(-1);
return -1;
} else {
client_infer_end = timeline.TimeStampUS();
postprocess_start = client_infer_end;
......
......@@ -239,6 +239,9 @@ class Client(object):
float_slot_batch, float_feed_names, int_slot_batch, int_feed_names,
fetch_names, result_batch, self.pid)
if res == -1:
return None
result_map_batch = []
result_map = {}
for i, name in enumerate(fetch_names):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册