Skip to content

Commit

Permalink
[TIPC] Update train_infer_python log dir (PaddlePaddle#690)
Browse files Browse the repository at this point in the history
* Update TIPC log dir

* Update TIPC log dir
  • Loading branch information
Birdylx authored Sep 15, 2022
1 parent d5216d6 commit 7c976e4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
6 changes: 0 additions & 6 deletions test_tipc/configs/edvr/train_amp_infer_python.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,3 @@ null:null
eval:null
null:null
##
===========================train_benchmark_params==========================
batch_size:4|64
fp_items:fp32
total_iters:100
--profiler_options:batch_range=[10,20];state=GPU;tracer_option=Default;profile_path=model.profile
flags:FLAGS_cudnn_exhaustive_search=1
2 changes: 1 addition & 1 deletion test_tipc/configs/edvr/train_infer_python.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ eval:null
null:null
##
===========================train_benchmark_params==========================
batch_size:4|64
batch_size:64
fp_items:fp32
total_iters:100
--profiler_options:batch_range=[10,20];state=GPU;tracer_option=Default;profile_path=model.profile
Expand Down
6 changes: 4 additions & 2 deletions test_tipc/test_train_inference_python.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ save_log_key=$(func_parser_key "${lines[48]}")
infer_key1=$(func_parser_key "${lines[50]}")
infer_value1=$(func_parser_value "${lines[50]}")

LOG_PATH="./test_tipc/output/${model_name}"
LOG_PATH="./test_tipc/output/${model_name}/${MODE}"
mkdir -p ${LOG_PATH}
status_log="${LOG_PATH}/results_python.log"

Expand Down Expand Up @@ -248,10 +248,12 @@ else
cmd="${python} -m paddle.distributed.launch --ips=${ips} --gpus=${gpu} ${run_train} ${set_use_gpu} ${set_save_model} ${set_train_params1} ${set_pretrain} ${set_epoch} ${set_batchsize} ${set_amp_config} ${set_amp_level}"
fi
# run train
eval "unset CUDA_VISIBLE_DEVICES"
export FLAGS_cudnn_deterministic=True
eval $cmd
echo $cmd
log_name=${train_model_name/checkpoint.pdparams/.txt}
train_log_path=$( echo "${save_log}/${log_name}")
eval "cat ${train_log_path} >> ${save_log}.log"
status_check $? "${cmd}" "${status_log}"

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

0 comments on commit 7c976e4

Please sign in to comment.