File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -105,11 +105,12 @@ FILENAME=$new_filename
105
105
MODE=$2
106
106
PARAMS=$3
107
107
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
+
109
110
110
111
to_static=" "
111
112
# 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
113
114
to_static=" d2sT_"
114
115
sed -i ' s/trainer:norm_train/trainer:to_static_train/g' $FILENAME
115
116
# clear PARAM contents
Original file line number Diff line number Diff line change 363
363
if [ ${# gpu} -ge 2 ]; then
364
364
cat ${WORK_PATH} /log/workerlog.0 > ${_train_log}
365
365
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
367
369
status_check ${last_status} " ${cmd} " " ${status_log} " " ${model_name} " " ${_train_log} "
368
370
369
371
set_eval_pretrain=$( func_set_params " ${pretrain_model_key} " " ${save_log} /${train_model_name} " )
You can’t perform that action at this time.
0 commit comments