tensorflow

启动脚本:

apiVersion: "serving.kserve.io/v1beta1"
kind: "InferenceService"
metadata:
  labels:
    predict-phantom.amh-group.com/modelName: "lgb-test"
    predict-phantom.amh-group.com/modelVersion: "v1.2"
  name: "t"
spec:
  predictor:
    maxReplicas: 1
    minReplicas: 1
    canaryTrafficPercent: 100
    tensorflow:
      resources:
        limits:
          memory: "4Gi"
          cpu: "8"
        requests:
          memory: "4Gi"
          cpu: "8"
      runtimeVersion: 2.3.0
      storageUri: "http://10.13.68.11/nfs/t-model.zip"

模型信息接口:

跟tensorflow-serving一致,地址为http://kf01:30000/v1/models/t/metadata

host:t.default.amh-group.com

预测接口:

http://kf01:30000/v1/models/t:predict

参数:

{
    "inputs":{
        "x_k1":[[0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 405, 405, 405, 430, 430, 430, 430, 430, 430, 430, 430, 430, 430, 462, 462, 462, 462, 462, 462, 462, 462, 462, 462, 679, 679, 679, 679, 679]],
        "x_k2":[[75, 76, 74, 75, 0, 0, 1, 0, 0, 171, 188, 261, 2, 405, 405, 33, 430, 430, 679, 679, 679]],
        "x_k3":[[0, 0, 405, 430, 462, 679, 679, 679]],
        "x_v1":[[1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]],
        "x_v2":[[100.0999984741211, 4.199999809265137, 0, 0]],
        "x_v3":[[0.0, 0.0, 0.0, 0.0, -1.0]],
        "is_training":false
    }
}

模型格式:

- 1

  - saved_model.pb

  - variables