Skip to content

Commit

Permalink
add test_semi_auto_parallel_hybrid_strategy (#60537)
Browse files Browse the repository at this point in the history
  • Loading branch information
Liujie0926 authored Jan 9, 2024
1 parent 5e35868 commit 44062f5
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
11 changes: 10 additions & 1 deletion tools/auto_parallel/ci_auto_parallel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ for element in "${target_lists_for_dygraph_ci[@]}";do
fi
count=$((count+1))
done
case_list[${#case_list[*]}]=test_semi_auto_parallel_hybrid_strategy
for file_name in `git diff --numstat upstream/${AGILE_COMPILE_BRANCH} |awk '{print $NF}'`;do
arr_file_name=(${file_name//// })
dir1=${arr_file_name[0]}
Expand Down Expand Up @@ -127,7 +128,11 @@ if [[ "${case_list[*]}" == *"gpt-3_auto"* ]] && [[ "${case_list[*]}" == *"gpt-3_
echo ${case_list[*]}
fi
####################

if [[ "${case_list[*]}" == *"auto_unit_test"* ]]; then
echo "命中auto_unit_test, 不再单独执行test_semi_auto_parallel_hybrid_strategy"
case_list=("${case_list[@]/*test_semi_auto_parallel_hybrid_strategy*/}")
echo ${case_list[*]}
fi
case_list=($(awk -v RS=' ' '!a[$1]++' <<< ${case_list[*]}))
if [[ ${#case_list[*]} -ne 0 ]];then
echo -e "\033[31m =======CI Check case========= \033"
Expand Down Expand Up @@ -165,6 +170,10 @@ if [[ ${#case_list[*]} -ne 0 ]];then
bash /workspace/Paddle/tools/auto_parallel/ci_case_unit.sh dygraph_unit_test
print_info $? `ls -lt ${log_path} | grep "test" | head -n 1 | awk '{print $9}'` ${case}
let case_num++
elif [[ ${case} == "test_semi_auto_parallel_hybrid_strategy" ]];then
bash /workspace/Paddle/tools/auto_parallel/ci_case_unit.sh test_semi_auto_parallel_hybrid_strategy
print_info $? `ls -lt ${log_path} | grep "test" | head -n 1 | awk '{print $9}'` ${case}
let case_num++
else
echo -e "\033[31m ---- no ${case} \033"
let case_num++
Expand Down
7 changes: 7 additions & 0 deletions tools/auto_parallel/ci_case_unit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@ main() {
elif [[ $exec_case =~ "dygraph_unit_test" ]];then
cd ${dygraph_case_path}
case_list_unit
elif [[ $exec_case =~ "test_semi_auto_parallel_hybrid_strategy" ]];then
cd ${auto_case_path}
export PYTHONPATH=../..:$PYTHNPATH
python test_semi_auto_parallel_hybrid_strategy.py >>${log_path}/$exec_case 2>&1
if [ $? -eq 0 ]; then
tail -n 10 ${log_path}/$exec_case
fi
else
echo -e "\033[31m ---- Invalid exec_case $exec_case \033[0m"
fi
Expand Down

0 comments on commit 44062f5

Please sign in to comment.