GET /v2
GET /v2/
响应字段 |
描述 |
数据类型 |
---|---|---|
serverName |
推理服务名称。 |
字符串 |
{'errorCode': 0, 'errorMsg': 'Succeeded!', 'isSuccess': true, 'outputs': [{'server_name': 'StreamServer'}]}
GET /v2/live
GET /v2/live/
响应字段 |
描述 |
数据类型 |
---|---|---|
isLive |
推理服务是否在运行。 |
布尔值 |
{'errorCode': 0, 'errorMsg': 'Succeeded!', 'isSuccess': true, 'outputs': [{'isLive': True}]}
GET /v2/ready
GET /v2/ready/
响应字段 |
描述 |
数据类型 |
---|---|---|
isReady |
推理服务是否已经准备好接受推理请求。 |
布尔值 |
GET v2/streams/${STREAM_NAME}/ready
响应字段 |
描述 |
数据类型 |
---|---|---|
isReady |
模型或者Stream是否已经准备好接受推理请求。 |
布尔值 |
{'errorCode': 0, 'errorMsg': 'Succeeded!', 'isSuccess': true, 'outputs': [{'isReady': True}]}
${MODEL_NAME}和${STREAM_NAME}限制为字符串形式,字符集合为字母、数字、符号(+-_)的组合。
GET v2/streams/${STREAM_NAME}/config
响应字段 |
描述 |
数据类型 |
---|---|---|
streamsConfig/modelsConfig |
模型或者Stream的推理配置信息。 |
JSON字符串 |
{'errorCode': 0, 'errorMsg': 'Succeeded!', 'isSuccess': true, 'outputs': [{'ModelSample': {'deviceId': 1, 'dynamicBatching': {'dynamicStrategy': 'Nearest', 'preferredBatchSize': [1, 2, 4, 8], 'singleBatchInfer': 0, 'waitingTime': 100}, 'inferType': 'models', 'inputs': [{'dataType': 'UINT8', 'format': 'FORMAT_NHWC', 'id': 0, 'name': 'Placeholder', 'shape': [-1, 224, 224, 3]}], 'name': 'resnet50', 'outputs': [{'dataType': 'FLOAT32', 'format': 'FORMAT_NONE', 'id': 0, 'name': 'fp32_vars/dense/BiasAdd:0', 'shape': [-1, 1001]}], 'timeoutMs': 3000}}]}
${MODEL_NAME}和${STREAM_NAME}限制为字符串形式,字符集合为字母、数字、符号(+-_)的组合。