From 27213769e1e720930b27a91c92d8cbffcf6dd28a Mon Sep 17 00:00:00 2001 From: "jiawei.wang" Date: Thu, 4 Nov 2021 08:57:05 +0800 Subject: [PATCH] fix 2 config --- python/examples/pipeline/bert/config.yml | 17 ++++++++++++++++- python/examples/pipeline/ocr/config.yml | 2 ++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/python/examples/pipeline/bert/config.yml b/python/examples/pipeline/bert/config.yml index a2b39264..5f122664 100644 --- a/python/examples/pipeline/bert/config.yml +++ b/python/examples/pipeline/bert/config.yml @@ -1,17 +1,32 @@ +#worker_num, 最大并发数。当build_dag_each_worker=True时, 框架会创建worker_num个进程,每个进程内构建grpcSever和DAG +##当build_dag_each_worker=False时,框架会设置主线程grpc线程池的max_workers=worker_num worker_num: 20 +#build_dag_each_worker, False,框架在进程内创建一条DAG;True,框架会每个进程内创建多个独立的DAG +build_dag_each_worker: false + dag: + #op资源类型, True, 为线程模型;False,为进程模型 is_thread_op: false + #使用性能分析, True,生成Timeline性能数据,对性能有一定影响;False为不使用 tracer: interval_s: 10 +#http端口, rpc_port和http_port不允许同时为空。当rpc_port可用且http_port为空时,不自动生成http_port http_port: 18082 +#rpc端口, rpc_port和http_port不允许同时为空。当rpc_port为空且http_port不为空时,会自动将rpc_port设置为http_port+1 rpc_port: 9998 op: bert: + #并发数,is_thread_op=True时,为线程并发;否则为进程并发 concurrency: 2 - + #当op配置没有server_endpoints时,从local_service_conf读取本地服务配置 local_service_conf: + #client类型,包括brpc, grpc和local_predictor.local_predictor不启动Serving服务,进程内预测 client_type: local_predictor + # device_type, 0=cpu, 1=gpu, 2=tensorRT, 3=arm cpu, 4=kunlun xpu device_type: 1 + #计算硬件ID,当devices为""或不写时为CPU预测;当devices为"0", "0,1,2"时为GPU预测,表示使用的GPU卡 devices: '2' + #Fetch结果列表,以bert_seq128_model中fetch_var的alias_name为准, 如果没有设置则全部返回 fetch_list: + #bert模型路径 model_config: bert_seq128_model/ diff --git a/python/examples/pipeline/ocr/config.yml b/python/examples/pipeline/ocr/config.yml index 58e3ed54..18b960b0 100644 --- a/python/examples/pipeline/ocr/config.yml +++ b/python/examples/pipeline/ocr/config.yml @@ -71,6 +71,8 @@ op: #Fetch结果列表,以client_config中fetch_var的alias_name为准 fetch_list: ["ctc_greedy_decoder_0.tmp_0", "softmax_0.tmp_0"] + # device_type, 0=cpu, 1=gpu, 2=tensorRT, 3=arm cpu, 4=kunlun xpu + device_type: 1 #计算硬件ID,当devices为""或不写时为CPU预测;当devices为"0", "0,1,2"时为GPU预测,表示使用的GPU卡 devices: "" -- GitLab