提交 7c882ba6 编写于 作者: M MRXLT

fix ut

上级 033e6734
......@@ -26,10 +26,10 @@ x = [
]
for i in range(3):
fetch_map = client.predict(feed={"x": x}, fetch=["price"])
if fetch_map["serving_grpc_error"] == 0:
if fetch_map["serving_status_code"] == 0:
print(fetch_map)
elif fetch_map["serving_grpc_error"].code(
elif fetch_map["serving_status_code"].code(
) == grpc.StatusCode.DEADLINE_EXCEEDED:
print('timeout')
else:
print(fetch_map["serving_grpc_error"])
print(fetch_map["serving_status_code"])
......@@ -643,7 +643,7 @@ class MultiLangClient(object):
self.profile_.print_profile()
return ret
except grpc.RpcError as e:
return {"serving_grpc_error": e}
return {"serving_status_code": e.code()}
else:
req = self._pack_inference_request(
feed, fetch, is_python=is_python, log_id=log_id)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册