Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleClas
提交
2700beea
P
PaddleClas
项目概览
PaddlePaddle
/
PaddleClas
1 年多 前同步成功
通知
115
Star
4999
Fork
1114
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
19
列表
看板
标记
里程碑
合并请求
6
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleClas
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
19
Issue
19
列表
看板
标记
里程碑
合并请求
6
合并请求
6
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
2700beea
编写于
9月 08, 2022
作者:
G
gaotingquan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
tipc: fix log path
上级
fb669a05
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
38 addition
and
30 deletion
+38
-30
test_tipc/test_inference_cpp.sh
test_tipc/test_inference_cpp.sh
+2
-1
test_tipc/test_inference_jeston.sh
test_tipc/test_inference_jeston.sh
+3
-2
test_tipc/test_lite_arm_cpu_cpp.sh
test_tipc/test_lite_arm_cpu_cpp.sh
+4
-4
test_tipc/test_paddle2onnx.sh
test_tipc/test_paddle2onnx.sh
+2
-1
test_tipc/test_ptq_inference_python.sh
test_tipc/test_ptq_inference_python.sh
+5
-4
test_tipc/test_serving_infer_cpp.sh
test_tipc/test_serving_infer_cpp.sh
+5
-4
test_tipc/test_serving_infer_python.sh
test_tipc/test_serving_infer_python.sh
+6
-4
test_tipc/test_train_inference_python.sh
test_tipc/test_train_inference_python.sh
+11
-10
未找到文件。
test_tipc/test_inference_cpp.sh
浏览文件 @
2700beea
...
...
@@ -37,7 +37,8 @@ cpp_benchmark_value=$(func_parser_value "${lines[16]}")
generate_yaml_cmd
=
$(
func_parser_value
"
${
lines
[17]
}
"
)
transform_index_cmd
=
$(
func_parser_value
"
${
lines
[18]
}
"
)
LOG_PATH
=
"./test_tipc/output/
${
model_name
}
/
${
MODE
}
"
CLS_ROOT_PATH
=
$(
pwd
)
LOG_PATH
=
"
${
CLS_ROOT_PATH
}
/test_tipc/output/
${
model_name
}
/
${
MODE
}
"
mkdir
-p
${
LOG_PATH
}
status_log
=
"
${
LOG_PATH
}
/results_cpp.log"
# generate_yaml_cmd="python3 test_tipc/generate_cpp_yaml.py"
...
...
test_tipc/test_inference_jeston.sh
浏览文件 @
2700beea
...
...
@@ -42,7 +42,8 @@ infer_key1=$(func_parser_key "${lines[17]}")
infer_value1
=
$(
func_parser_value
"
${
lines
[17]
}
"
)
LOG_PATH
=
"./test_tipc/output"
CLS_ROOT_PATH
=
$(
pwd
)
LOG_PATH
=
"
${
CLS_ROOT_PATH
}
/test_tipc/output"
mkdir
-p
${
LOG_PATH
}
status_log
=
"
${
LOG_PATH
}
/results_python.log"
...
...
@@ -71,7 +72,7 @@ if [ ${MODE} = "whole_infer" ]; then
echo
$export_cmd
eval
$export_cmd
status_export
=
$?
status_check
$status_export
"
${
export_cmd
}
"
"
${
status_log
}
"
"
${
model_name
}
"
status_check
$status_export
"
${
export_cmd
}
"
"
${
status_log
}
"
"
${
model_name
}
"
""
else
save_infer_dir
=
${
infer_model
}
fi
...
...
test_tipc/test_lite_arm_cpu_cpp.sh
浏览文件 @
2700beea
#!/bin/bash
source
test_tipc/common_func.sh
current_path
=
$PWD
IFS
=
$'
\n
'
...
...
@@ -33,7 +32,8 @@ num_threads_list=$(func_parser_value_lite "${tipc_lines[5]}" ":")
batch_size_list
=
$(
func_parser_value_lite
"
${
tipc_lines
[6]
}
"
":"
)
precision_list
=
$(
func_parser_value_lite
"
${
tipc_lines
[7]
}
"
":"
)
LOG_PATH
=
${
current_path
}
"/output"
CLS_ROOT_PATH
=
$(
pwd
)
LOG_PATH
=
"
${
CLS_ROOT_PATH
}
/output"
mkdir
-p
${
LOG_PATH
}
status_log
=
"
${
LOG_PATH
}
/results.log"
...
...
@@ -65,9 +65,9 @@ function func_test_tipc(){
real_inference_cmd
=
$(
echo
${
inference_cmd
}
|
awk
-F
" "
'{print path $1" "path $2" "path $3}'
path
=
"
$lite_arm_work_path
"
)
command1
=
"adb push
${
_basic_config
}
${
lite_arm_work_path
}
"
eval
${
command1
}
command2
=
"adb shell 'export LD_LIBRARY_PATH=
${
lite_arm_work_path
}
;
${
real_inference_cmd
}
'
>
${
_save_log_path
}
2>&1"
command2
=
"adb shell 'export LD_LIBRARY_PATH=
${
lite_arm_work_path
}
;
${
real_inference_cmd
}
' >
${
_save_log_path
}
2>&1"
eval
${
command2
}
status_check
$?
"
${
command2
}
"
"
${
status_log
}
"
"
${
model_name
}
"
status_check
$?
"
${
command2
}
"
"
${
status_log
}
"
"
${
model_name
}
"
"
${
_save_log_path
}
"
done
done
done
...
...
test_tipc/test_paddle2onnx.sh
浏览文件 @
2700beea
...
...
@@ -36,7 +36,8 @@ inference_hardware_value=$(func_parser_value "${lines[14]}")
inference_config_key
=
$(
func_parser_key
"
${
lines
[15]
}
"
)
inference_config_value
=
$(
func_parser_value
"
${
lines
[15]
}
"
)
LOG_PATH
=
"./test_tipc/output/
${
model_name
}
/
${
MODE
}
"
CLS_ROOT_PATH
=
$(
pwd
)
LOG_PATH
=
"
${
CLS_ROOT_PATH
}
/test_tipc/output/
${
model_name
}
/
${
MODE
}
"
mkdir
-p
${
LOG_PATH
}
status_log
=
"
${
LOG_PATH
}
/results_paddle2onnx.log"
...
...
test_tipc/test_ptq_inference_python.sh
浏览文件 @
2700beea
...
...
@@ -94,7 +94,8 @@ if [[ $MODE = 'benchmark_train' ]]; then
epoch_num
=
1
fi
LOG_PATH
=
"./test_tipc/output/
${
model_name
}
/
${
MODE
}
"
CLS_ROOT_PATH
=
$(
pwd
)
LOG_PATH
=
"
${
CLS_ROOT_PATH
}
/test_tipc/output/
${
model_name
}
/
${
MODE
}
"
mkdir
-p
${
LOG_PATH
}
status_log
=
"
${
LOG_PATH
}
/results_python.log"
...
...
@@ -123,7 +124,7 @@ function func_inference() {
eval
$command
last_status
=
${
PIPESTATUS
[0]
}
eval
"cat
${
_save_log_path
}
"
status_check
$last_status
"
${
command
}
"
"
../
${
status_log
}
"
"
${
model_name
}
"
status_check
$last_status
"
${
command
}
"
"
${
status_log
}
"
"
${
model_name
}
"
done
done
done
...
...
@@ -145,7 +146,7 @@ function func_inference() {
eval
$command
last_status
=
${
PIPESTATUS
[0]
}
eval
"cat
${
_save_log_path
}
"
status_check
$last_status
"
${
command
}
"
"
../
${
status_log
}
"
"
${
model_name
}
"
status_check
$last_status
"
${
command
}
"
"
${
status_log
}
"
"
${
model_name
}
"
done
done
done
...
...
@@ -168,6 +169,6 @@ if [ ${kl_quant_cmd_value} != "null" ] && [ ${kl_quant_cmd_value} != "False" ];
ln
-s
__params__ inference.pdiparams
cd
../../deploy
is_quant
=
True
func_inference
"
${
python
}
"
"
${
inference_py
}
"
"../
${
infer_model_dir_list
}
/quant_post_static_model"
"
../
${
LOG_PATH
}
"
"
${
infer_img_dir
}
"
${
is_quant
}
func_inference
"
${
python
}
"
"
${
inference_py
}
"
"../
${
infer_model_dir_list
}
/quant_post_static_model"
"
${
LOG_PATH
}
"
"
${
infer_img_dir
}
"
${
is_quant
}
cd
..
fi
test_tipc/test_serving_infer_cpp.sh
浏览文件 @
2700beea
...
...
@@ -38,9 +38,9 @@ pipeline_py=$(func_parser_value "${lines[13]}")
function
func_serving_cls
(){
LOG_PATH
=
"test_tipc/output/
${
model_name
}
/
${
MODE
}
/cpp"
CLS_ROOT_PATH
=
$(
pwd
)
LOG_PATH
=
"
${
CLS_ROOT_PATH
}
/test_tipc/output/
${
model_name
}
/
${
MODE
}
/cpp"
mkdir
-p
${
LOG_PATH
}
LOG_PATH
=
"../../
${
LOG_PATH
}
"
status_log
=
"
${
LOG_PATH
}
/results_cpp_serving.log"
IFS
=
'|'
...
...
@@ -141,10 +141,11 @@ function func_serving_cls(){
function
func_serving_rec
(){
LOG_PATH
=
"test_tipc/output/
${
model_name
}
"
CLS_ROOT_PATH
=
$(
pwd
)
LOG_PATH
=
"
${
CLS_ROOT_PATH
}
/test_tipc/output/
${
model_name
}
"
mkdir
-p
${
LOG_PATH
}
LOG_PATH
=
"../../../
${
LOG_PATH
}
"
status_log
=
"
${
LOG_PATH
}
/results_cpp_serving.log"
trans_model_py
=
$(
func_parser_value
"
${
lines
[5]
}
"
)
cls_infer_model_dir_key
=
$(
func_parser_key
"
${
lines
[6]
}
"
)
cls_infer_model_dir_value
=
$(
func_parser_value
"
${
lines
[6]
}
"
)
...
...
test_tipc/test_serving_infer_python.sh
浏览文件 @
2700beea
...
...
@@ -41,10 +41,11 @@ threads="1"
function
func_serving_cls
(){
LOG_PATH
=
"test_tipc/output/
${
model_name
}
/
${
MODE
}
"
CLS_ROOT_PATH
=
$(
pwd
)
LOG_PATH
=
"
${
CLS_ROOT_PATH
}
/test_tipc/output/
${
model_name
}
/
${
MODE
}
"
mkdir
-p
${
LOG_PATH
}
LOG_PATH
=
"../../
${
LOG_PATH
}
"
status_log
=
"
${
LOG_PATH
}
/results_serving.log"
IFS
=
'|'
# pdserving
...
...
@@ -159,10 +160,11 @@ function func_serving_cls(){
function
func_serving_rec
(){
LOG_PATH
=
"test_tipc/output/
${
model_name
}
/
${
MODE
}
"
CLS_ROOT_PATH
=
$(
pwd
)
LOG_PATH
=
"
${
CLS_ROOT_PATH
}
/test_tipc/output/
${
model_name
}
/
${
MODE
}
"
mkdir
-p
${
LOG_PATH
}
LOG_PATH
=
"../../../
${
LOG_PATH
}
"
status_log
=
"
${
LOG_PATH
}
/results_serving.log"
trans_model_py
=
$(
func_parser_value
"
${
lines
[5]
}
"
)
cls_infer_model_dir_key
=
$(
func_parser_key
"
${
lines
[6]
}
"
)
cls_infer_model_dir_value
=
$(
func_parser_value
"
${
lines
[6]
}
"
)
...
...
test_tipc/test_train_inference_python.sh
浏览文件 @
2700beea
...
...
@@ -95,7 +95,8 @@ if [[ $MODE = 'benchmark_train' ]]; then
epoch_num
=
1
fi
LOG_PATH
=
"./test_tipc/output/
${
model_name
}
/
${
MODE
}
"
CLS_ROOT_PATH
=
$(
pwd
)
LOG_PATH
=
"
${
CLS_ROOT_PATH
}
/test_tipc/output/
${
model_name
}
/
${
MODE
}
"
mkdir
-p
${
LOG_PATH
}
status_log
=
"
${
LOG_PATH
}
/results_python.log"
...
...
@@ -126,7 +127,7 @@ function func_inference() {
eval
$command
last_status
=
${
PIPESTATUS
[0]
}
eval
"cat
${
_save_log_path
}
"
status_check
$last_status
"
${
command
}
"
"
../
${
status_log
}
"
"
${
model_name
}
"
"
${
_save_log_path
}
"
status_check
$last_status
"
${
command
}
"
"
${
status_log
}
"
"
${
model_name
}
"
"
${
_save_log_path
}
"
done
done
done
...
...
@@ -149,7 +150,7 @@ function func_inference() {
eval
$command
last_status
=
${
PIPESTATUS
[0]
}
eval
"cat
${
_save_log_path
}
"
status_check
$last_status
"
${
command
}
"
"
../
${
status_log
}
"
"
${
model_name
}
"
"
${
_save_log_path
}
"
status_check
$last_status
"
${
command
}
"
"
${
status_log
}
"
"
${
model_name
}
"
"
${
_save_log_path
}
"
done
done
done
...
...
@@ -171,12 +172,12 @@ if [[ ${MODE} = "whole_infer" ]]; then
last_status
=
${
PIPESTATUS
[0]
}
status_check
$last_status
"
${
command
}
"
"
${
status_log
}
"
"
${
model_name
}
"
"
${
log_path
}
"
cd
${
infer_model_dir_list
}
/quant_post_static_model
ln
-s
__model__
inference.pdmodel
ln
-s
__params__
inference.pdiparams
ln
-s
model.pdmodel
inference.pdmodel
ln
-s
model.pdiparams
inference.pdiparams
cd
../../deploy
is_quant
=
True
gpu
=
0
func_inference
"
${
python
}
"
"
${
inference_py
}
"
"../
${
infer_model_dir_list
}
/quant_post_static_model"
"
../
${
LOG_PATH
}
"
"
${
infer_img_dir
}
"
"
${
is_quant
}
"
"
${
gpu
}
"
func_inference
"
${
python
}
"
"
${
inference_py
}
"
"../
${
infer_model_dir_list
}
/quant_post_static_model"
"
${
LOG_PATH
}
"
"
${
infer_img_dir
}
"
"
${
is_quant
}
"
"
${
gpu
}
"
cd
..
fi
else
...
...
@@ -262,7 +263,7 @@ else
set_save_model
=
$(
func_set_params
"
${
save_model_key
}
"
"
${
save_log
}
"
)
if
[
${#
gpu
}
-le
2
]
;
then
# train with cpu or single gpu
cmd
=
"
${
python
}
${
run_train
}
${
set_use_gpu
}
${
set_save_model
}
${
set_epoch
}
${
set_pretrain
}
${
set_autocast
}
${
set_batchsize
}
${
set_train_params1
}
"
cmd
=
"
${
python
}
${
run_train
}
${
set_use_gpu
}
${
set_save_model
}
${
set_epoch
}
${
set_pretrain
}
${
set_autocast
}
${
set_batchsize
}
${
set_train_params1
}
"
elif
[
${#
ips
}
-le
15
]
;
then
# train with multi-gpu
cmd
=
"
${
python
}
-m paddle.distributed.launch --gpus=
${
gpu
}
${
run_train
}
${
set_use_gpu
}
${
set_save_model
}
${
set_epoch
}
${
set_pretrain
}
${
set_autocast
}
${
set_batchsize
}
${
set_train_params1
}
"
else
# train with multi-machine
...
...
@@ -273,8 +274,8 @@ else
# export FLAGS_cudnn_deterministic=True
sleep
5
eval
$cmd
eval
"cat
${
save_log
}
/train.log >>
${
save_log
}
.log"
status_check
$?
"
${
cmd
}
"
"
${
status_log
}
"
"
${
model_name
}
"
"
${
save_log
}
.log"
"
eval
"cat
${
save_log
}
/
${
model_name
}
/
train.log >>
${
save_log
}
.log"
status_check
$?
"
${
cmd
}
"
"
${
status_log
}
"
"
${
model_name
}
"
"
${
save_log
}
.log"
sleep
5
if
[[
$FILENAME
==
*
GeneralRecognition
*
]]
;
then
...
...
@@ -314,7 +315,7 @@ else
eval
$env
save_infer_path
=
"
${
save_log
}
"
cd
deploy
func_inference "
${
python
}
" "
${
inference_py
}
" "
../
${
save_infer_path
}
" "
../
${
LOG_PATH
}
" "
${
infer_img_dir
}
" "
${
flag_quant
}
" "
${
gpu
}
"
func_inference
"
${
python
}
"
"
${
inference_py
}
"
"
${
save_infer_path
}
"
"
${
LOG_PATH
}
"
"
${
infer_img_dir
}
"
"
${
flag_quant
}
"
"
${
gpu
}
"
cd
..
fi
eval
"unset CUDA_VISIBLE_DEVICES"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录