昇腾社区首页
中文
注册

config.yaml配置参数详解

参数

默认值

说明

cert.ca

CA证书路径。

cert.crt

服务端证书路径。

cert.key

服务端证书私钥路径。

cert.key_mm

服务端证书私钥口令。

cert.crl

证书吊销列表。

check_cert_holder.enable

true

是否开启校验证书持有者,默认开启校验

check_cert_holder.host_name

*.huawei.com

用于证书合法性校验,持有者信息“Common Name(CN)”“subjectAltName”中的DNS必须要匹配*.huawei.com。不推荐修改此值。

upload_image_and_result

APULIS_ENDPOINT

环境变量名称,用于获取URL上传推理结果给AI平台。

upload_infertime_pushgateway

PUSHGATEWAY_INFERTIME_METRICS_ADDRESS

环境变量名称,用于获取URL上传推理时延给AI平台。

ai_platform_http_client.ca

开启“https”和上传图片到第三方时,配置的服务端CA证书,用于客户端校验服务端。

ai_platform_http_client.crl

开启“https”和上传图片到第三方时,配置的第三方服务端的证书吊销列表。

http_pushgateway_client.ca

推理结果上报第三方Prometheus时,配置的客户端证书,用于客户端校验服务端。

http_pushgateway_client.crl

推理结果上报第三方Prometheus时,配置的第三方Prometheus服务端的证书吊销列表。

ca_retention_time

证书留存期过期时间,导入证书时自动设置,默认为留存一年。

upload_queue_length

100

开启上传图片到第三方功能时,队列最大缓存长度。

可修改范围为[1, 1000]。

rate_limit

1000/minute

流控,参数的取值范围为[1,3000],默认1分钟1000次。

该配置参数在多app进程下不共享(如果配置为“1000/minute”,每个app进程流控限制都是“1000/minute”),可根据用户需求自行配置。

get_result_timeout

5000

获取芯片推理结果超时时间,默认5000ms。

可修改范围为[1000, 60000]。

sdp_algorithm_id

9

加密算法,加密脚本和开启“https”时使用。

  • AES128_GCM = 8
  • AES256_GCM = 9

ssl_ciphers

ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-CCM:ECDHE-ECDSA-AES128-CCM

TLS加密算法套件,开启“https”时使用。

ai_server_logging_config.log_dir

logs

推理日志存储路径,默认“logs”目录。

  • 绝对路径只支持配置存储在“/inference”目录下。
  • 相对路径会在“mxAOIService”目录下创建,例如:logs/xxx。

ai_server_logging_config.formatter

'%(levelname)s %(asctime)s [%(filename)s:%(lineno)d] %(message)s'

推理日志格式。

ai_server_logging_config.datefmt

'%Y-%m-%d %H:%M:%S'

推理日志日期格式。

ai_server_logging_config.max_bytes

104857600(100 * 1024 * 1024)

单个日志文件大小,默认100M。

可修改范围为[1e6, 1e9]。

ai_server_logging_config.backup_count

10

推理日志备份数量,默认10。

可修改范围为[1, 100]。

colloid_detection_min_area_n

0.3

计算LabelMask的BlobMask和Blob信息(Id、label、area)后,需要过滤掉Area极小的Blob, 阈值定义为模板最小Blob面积的n倍,n默认取0.3。

可修改范围为(0, 1]。

image_size_limit

20971520 (20 * 1024 * 1024)

推理单张图片大小,默认20M,最大值30M。

可修改范围为[1, 31457280]。

image_number_limit

10

单次推理请求发送图片数量不得大于10张。

可修改范围为[1, 10]。

ip_white_list

[]

用户设备ip白名单。

  • 默认不做限制。
  • 设置白名单,仅允许白名单内ip访问。

app_multi_process_num

5

RESTful app启动的进程数, 默认5个。

可修改范围为:[1, 10]。

max_model_multi_process_num

10

模型加载的进程数,默认10个。

可修改范围为[1, 40]。

request_max_content_length

31457280(30 * 1024 * 1024)

请求允许的最大body长度,默认30M,最大可配200M。

可修改范围为[1, 209715200]。

kmc_config_sem_key

0x20161516

KMC密钥文件锁信号量, 导入后默认权限为600。

不同用户下执行证书导入时,需要修改此值,否则可能出现导入证书失败,可参考4进行处理。

可修改范围为[0x20161112, 0x20169999]。

http_keepalive_time

30

客户端与服务端的连接keep-alive时间,默认时间30s。

可修改范围为[1, 120]。

support_scene_list

- detection/DetectionInferScene

- ocr/OCRInferScene

- segmentation/SegmentationInferScene

- detection_detection/DetDetInferScene

- detection_ocr/DetOCRInferScene

- detection_segmentation/DetSegInferScene

- tag_paste/TagPaste

- wafer/WaferInferScene

- detection_htp/DetHTPInferScene

推理服务默认支持的场景类。

其中“wafer/WaferInferScene”场景仅在半导体服务软件包中内置,其余7种场景在3c半导体服务包中内置。

scenes_module_map

det: det_cls

det_cls: det_cls

det_det: det_det

ocr: ocr

seg: det_seg

det_ocr: det_ocr

det_seg: det_seg

tag_paste: tag_paste

wafer: wafer

det_htp: det_htp

推理服务默认支持的场景名字及对应的场景标签。

其中“wafer: wafer”场景仅在半导体服务软件包中内置,其余场景在3c半导体服务包中内置。

scenes_map

det: detection

det_cls: detection

det_det: detection_detection

ocr: ocr

det_ocr: detection_ocr

seg: segmentation

det_seg: detection_segmentation

tag_paste: tag_paste

wafer: wafer

det_htp: detection_htp

推理服务默认支持的场景名字及对应的推理场景名称。

其中“wafer: wafer”场景仅在半导体服务软件包中内置,其余场景在3c半导体服务包中内置。