-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathsettings.yaml
47 lines (40 loc) · 1.98 KB
/
settings.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# HTTP 服务端参数
API:
Port: 5000
Addr: 0.0.0.0
SM2PrivateKey: "JShsBOJL0RgPAoPttEB1hgtPAvCikOl0V1oTOYL7k5U=" # SM2私钥
AppIdSecret: { # 接口调用分配的 appid 和 sevret
"3EA25569454745D01219080B779F021F" : "41DF0E6AE27B5282C07EF5124642A352",
}
RequestTimestampDiff: 300 # api请求timestamp与服务器时间差异(秒),大于差异绝对值将被拒绝
# 推理服务队列的参数
Server:
RedisServer: "127.0.0.1:7480"
RedisPasswd: "e18ffb7484f4d69c2acb40008471a71c"
QueueName: "goinfer-synchronous-asynchronous-queue"
RequestQueueAmount: 1 # 请求队列数量,要启动相同数量的server
MessageTimeout: 10 # 推理计算最大等待时间
MaxWorkers: 8 # 模型推理最大并发数
ErrCode:
QueueTimeout: { "code": 9997, "msg": "消息队列超时" }
UnknownApi: { "code": 9900, "msg": "未知的API" }
InferFail: { "code": 9998, "msg": "模型推理失败" }
ApiEntryFail: { "code": 9701, "msg": "API参数处理失败" }
SendMsgFail: { "code": 9702, "msg": "发送队列消息失败" }
RecvMsgFail: { "code": 9703, "msg": "接收队列消息失败" }
UnknownApiPath: { "code": 9709, "msg": "未知的API路径" }
SignFail: { "code": 9800, "msg": "验签失败" }
SignFail1: { "code": 9801, "msg": "缺少参数" }
SignFail2: { "code": 9802, "msg": "时间戳错误" }
SignFail3: { "code": 9803, "msg": "签名算法错误" }
SignFail5: { "code": 9805, "msg": "AppId错误" }
SignFail6: { "code": 9806, "msg": "版本号错误" }
# 自定义参数
Customer: { # 以下 key-value 为用户自定义使用
# 预训练模型路径
"BertModelPath" : "export/outputs/saved-model",
"BertVocabPath" : "export/outputs/vocab.txt",
"MobilenetModelPath" : "export/outputs/saved-model_keras",
# 人脸定位模型来自 https://github.com/deepinsight/insightface/tree/master/model_zoo
"FacedetModelPath" : "../../../cv/face_model/arcface/models/buffalo_l/det_10g.onnx",
}