Skip to content

Commit e1f26f0

Browse files
committed
update paddlex ci
1 parent bfbd3c3 commit e1f26f0

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

models/PaddleX/ci/checker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ def run_checks(self, args):
368368

369369
if args.check_train_result_json:
370370
# 检查 train_result.json 内容
371-
train_result_json = os.path.join(output_dir, "train_results.json")
371+
train_result_json = os.path.join(output_dir, "train_result.json")
372372
check_weights_items = args.check_weights_items
373373
check_train_json_message = []
374374
check_train_json_flag, check_train_json_message = self.check_train_json_content(

models/PaddleX/ci/ci_run.sh

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -52,26 +52,26 @@ function run_command(){
5252
printf "\e[32m|%-20s| %-50s | %-20s\n\e[0m" "[${time_stamp}]" "${command}"
5353
eval $command
5454
last_status=${PIPESTATUS[0]}
55-
if [[ $MODE != 'PaddleX' ]];then
56-
n=1
57-
# Try 3 times to run command if it fails
58-
while [[ $last_status != 0 ]]; do
59-
sleep 10
60-
n=`expr $n + 1`
61-
printf "\e[32m|%-20s| %-50s | %-20s\n\e[0m" "[${time_stamp}]" "${command}"
62-
eval $command
63-
last_status=${PIPESTATUS[0]}
64-
if [[ $n -eq 3 && $last_status != 0 ]]; then
65-
echo "Retry 3 times failed with command: ${command}"
55+
n=1
56+
# Try 2 times to run command if it fails
57+
while [[ $last_status != 0 ]]; do
58+
sleep 10
59+
n=`expr $n + 1`
60+
printf "\e[32m|%-20s| %-50s | %-20s\n\e[0m" "[${time_stamp}]" "${command}"
61+
sync
62+
echo 1 > /proc/sys/vm/drop_caches
63+
eval $command
64+
last_status=${PIPESTATUS[0]}
65+
if [[ $n -eq 2 && $last_status != 0 ]]; then
66+
if [[ $MODE != 'PaddleX' ]];then
67+
echo "Retry 2 times failed with command: ${command}"
6668
exit 1
69+
else
70+
failed_cmd_list="$failed_cmd_list \n ${module_name} | command: ${command}"
71+
echo "Run ${command} failed"
6772
fi
68-
done
69-
else
70-
if [[ $last_status != 0 ]];then
71-
failed_cmd_list="$failed_cmd_list \n ${module_name} | command: ${command}"
72-
echo "Run ${command} failed"
7373
fi
74-
fi
74+
done
7575
}
7676

7777
# 准备数据集并做数据校验

0 commit comments

Comments
 (0)