python - 从 Tensorflow 服务服务器获取 StatusCode.FAILED_PRECONDITION:未找到服务签名密钥“tensorflow/serving/predict”
问题描述
尝试连接到 tf-serving 服务器时,从我的 python grpc 客户端收到以下错误:
<_Rendezvous of RPC that terminated with:
status = StatusCode.FAILED_PRECONDITION
details = "Serving signature key "tensorflow/serving/predict" not found."
debug_error_string = "{"created":"@1540559424.720048798","description":"Error received from peer","file":"src/core/lib/surface/call.cc","file_line":1099,"grpc_message":"Serving signature key "tensorflow/serving/predict" not found.","grpc_status":9}"
>
我相信这意味着当我构建可服务对象时,方法名称是错误的。但我看到在我的可服务模型构建器脚本中我使用了正确的名称。
prediction_signature = tf.saved_model.signature_def_utils.build_signature_def(
inputs=input_signature,
outputs=output_signature,
method_name=tf.saved_model.signature_constants.PREDICT_METHOD_NAME)
builder = saved_model_builder.SavedModelBuilder(os.path.join(output_path, str(version_number)))
客户端出现此错误的原因可能是什么?
解决方案
推荐阅读
- typescript - 为什么字符串和符号在区分联合方面工作不一致?
- azure - 监视 Azure 混合连接和本地数据网关
- python - 从列表中查找具有条件的最高总和组合
- git - [GIT]在 GIT 下的 My_Branch 中删除的文件在 REFRESH 时显示在 Eclipse My_Branch 工作区中
- postgresql - 在 PostgreSQL 中提取拆分字符串的最后一部分的最有效方法是什么?
- django - 尝试在 django 中制作轮播滑块并尝试从数据库中拍照然后在前端渲染
- sql - 从对象数组中获取数据 sql BigQuery
- c - Cortex M7:刚开始的分支
- php - 基于距离的PHP时间计算器问题
- php - Livewire 不重新渲染