Skip to content

Commit caa37ce

Browse files
authored
【benchmark】fix benchmark log (#3469)
1 parent 988204d commit caa37ce

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

tests/test_tipc/benchmark_train.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,12 @@ FILENAME=$new_filename
105105
MODE=$2
106106
PARAMS=$3
107107
REST_ARGS=$4
108-
# bash test_tipc/benchmark_train.sh test_tipc/configs/transformer/base/train_infer_python.txt benchmark_train to_static
108+
# bash test_tipc/benchmark_train.sh test_tipc/configs/transformer/base/train_infer_python.txt benchmark_train dynamicTostatic_bs64_fp32_DP_N1C1
109+
109110

110111
to_static=""
111112
# parse "to_static" options and modify trainer into "to_static_trainer"
112-
if [ $REST_ARGS = "to_static" ] || [ $PARAMS = "to_static" ] ;then
113+
if [[ $PARAMS =~ "dynamicTostatic" ]] ;then
113114
to_static="d2sT_"
114115
sed -i 's/trainer:norm_train/trainer:to_static_train/g' $FILENAME
115116
# clear PARAM contents

tests/test_tipc/test_train_inference_python.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -363,7 +363,9 @@ else
363363
if [ ${#gpu} -ge 2 ];then
364364
cat ${WORK_PATH}/log/workerlog.0 > ${_train_log}
365365
fi
366-
eval "cat ${_train_log}"
366+
if [ ${#gpu} -le 2 ];then # train with cpu or single gpu
367+
eval "cat ${_train_log}"
368+
fi
367369
status_check ${last_status} "${cmd}" "${status_log}" "${model_name}" "${_train_log}"
368370

369371
set_eval_pretrain=$(func_set_params "${pretrain_model_key}" "${save_log}/${train_model_name}")

0 commit comments

Comments
 (0)