語法
GET http://host:port/v1/models/${MODEL_NAME}[/versions/${VERSION}|/labels/${LABEL}]
API 呼叫範例
curl http://localhost:8501/v1/models/saved_model_half_plus_three
API Response 範例
{
"model_version_status": [
{
"version": "123",
"state": "AVAILABLE",
"status": {
"error_code": "OK",
"error_message": ""
}
}
]
}
語法
GET http://host:port/v1/models/${MODEL_NAME}[/versions/${VERSION}|/labels/${LABEL}]/metadata
API 呼叫範例
curl http://localhost:8501/v1/models/saved_model_half_plus_three/metadata
API Response 範例
{
"model_spec":{
"name": "saved_model_counter",
"signature_name": "",
"version": "123"
}
,
"metadata": {"signature_def": {
"signature_def": {
"incr_counter_by": {
"inputs": {
"delta": {
"dtype": "DT_FLOAT",
"tensor_shape": {
"dim": [],
"unknown_rank": true
},
"name": "delta:0"
}
},
"outputs": {
"output": {
"dtype": "DT_FLOAT_REF",
"tensor_shape": {
"dim": [],
"unknown_rank": false
},
"name": "incr_counter_by_op/AssignAdd:0"
}
},
"method_name": "tensorflow/serving/predict"
},
"reset_counter": {
"inputs": {},
"outputs": {
"output": {
"dtype": "DT_FLOAT_REF",
"tensor_shape": {
"dim": [],
"unknown_rank": false
},
"name": "reset_counter_op/Assign:0"
}
},
"method_name": "tensorflow/serving/predict"
},
"incr_counter": {
"inputs": {},
"outputs": {
"output": {
"dtype": "DT_FLOAT_REF",
"tensor_shape": {
"dim": [],
"unknown_rank": false
},
"name": "incr_counter_op/AssignAdd:0"
}
},
"method_name": "tensorflow/serving/predict"
},
"get_counter": {
"inputs": {},
"outputs": {
"output": {
"dtype": "DT_FLOAT_REF",
"tensor_shape": {
"dim": [],
"unknown_rank": false
},
"name": "counter:0"
}
},
"method_name": "tensorflow/serving/predict"
}
}
}
}
}