代码之家  ›  专栏  ›  技术社区  ›  enator

从Tensorflow服务服务器获取StatusCode.FAILED_PRECONDITION:未找到服务签名密钥“Tensorflow/serving/predict”

  •  1
  • enator  · 技术社区  · 6 年前

    尝试连接到tf服务服务器时,从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}"
    >
    

    我相信这意味着当我构建servables时,方法名是错误的。但我看到,在我的servable model builder脚本中,我使用了正确的名称。

    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)))
    

    客户端出现此错误的原因是什么?

    0 回复  |  直到 6 年前