From 2969933c9c7792e2245de9b8c001dc711e6e3e31 Mon Sep 17 00:00:00 2001 From: LDOUBLEV Date: Thu, 27 Jan 2022 06:17:23 +0000 Subject: [PATCH] add status_check and set save_log from env --- test_tipc/benchmark_train.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test_tipc/benchmark_train.sh b/test_tipc/benchmark_train.sh index ebbb46ad..7b7833ff 100644 --- a/test_tipc/benchmark_train.sh +++ b/test_tipc/benchmark_train.sh @@ -108,8 +108,8 @@ flags_value=$(func_parser_value "${lines[line_num]}") gpu_id=$(set_gpu_id $device_num) repo_name=$(get_repo_name ) -SAVE_LOG="benchmark_log" -status_log="benchmark_log/results.log" +SAVE_LOG=${BENCHMARK_LOG_DIR:-$(pwd)} # */benchmark_log +status_log="${SAVE_LOG}/benchmark_log/results.log" # set export IFS=";" @@ -173,6 +173,8 @@ if [ ${#gpu_id} -le 1 ];then --convergence_key ${convergence_key_value}: " echo $cmd eval $cmd + last_status=${PIPESTATUS[0]} + status_check $last_status "${cmd}" "${status_log}" else log_path="$SAVE_LOG/train_log" @@ -207,5 +209,7 @@ else --convergence_key ${convergence_key_value}: " echo $cmd eval $cmd + last_status=${PIPESTATUS[0]} + status_check $last_status "${cmd}" "${status_log}" fi -- GitLab