提交 a89df98f 编写于 作者: M MRXLT

fix ut

上级 6686247b
...@@ -26,9 +26,10 @@ x = [ ...@@ -26,9 +26,10 @@ x = [
] ]
for i in range(3): for i in range(3):
fetch_map = client.predict(feed={"x": x}, fetch=["price"]) fetch_map = client.predict(feed={"x": x}, fetch=["price"])
if fetch_map["serving_status_code"] == 0: if fetch_map["serving_grpc_error"] == 0:
print(fetch_map) print(fetch_map)
elif fetch_map["serving_status_code"] == grpc.StatusCode.DEADLINE_EXCEEDED: elif fetch_map["serving_grpc_error"].code(
) == grpc.StatusCode.DEADLINE_EXCEEDED:
print('timeout') print('timeout')
else: else:
print(fetch_map["serving_status_code"]) print(fetch_map["serving_grpc_error"])
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册