未验证 提交 9c624b16 编写于 作者: G gongweibao 提交者: GitHub

Extend unittest time of (#31570)

上级 580442ce
...@@ -9,7 +9,7 @@ endforeach() ...@@ -9,7 +9,7 @@ endforeach()
set_tests_properties(test_word2vec_book PROPERTIES TIMEOUT 120) set_tests_properties(test_word2vec_book PROPERTIES TIMEOUT 120)
set_tests_properties(test_recognize_digits PROPERTIES TIMEOUT 120) set_tests_properties(test_recognize_digits PROPERTIES TIMEOUT 120)
set_tests_properties(test_image_classification PROPERTIES TIMEOUT 200) set_tests_properties(test_image_classification PROPERTIES TIMEOUT 200)
set_tests_properties(test_label_semantic_roles PROPERTIES TIMEOUT 120) set_tests_properties(test_label_semantic_roles PROPERTIES TIMEOUT 240)
set_tests_properties(test_machine_translation PROPERTIES TIMEOUT 120) set_tests_properties(test_machine_translation PROPERTIES TIMEOUT 120)
set_tests_properties(test_rnn_encoder_decoder PROPERTIES TIMEOUT 120) set_tests_properties(test_rnn_encoder_decoder PROPERTIES TIMEOUT 120)
set_tests_properties(test_fit_a_line PROPERTIES TIMEOUT 120) set_tests_properties(test_fit_a_line PROPERTIES TIMEOUT 120)
...@@ -16,27 +16,19 @@ ...@@ -16,27 +16,19 @@
set -e set -e
function test_launch_ps(){ server_port_0=${PADDLE_DIST_UT_PORT}
server_port_0=${PADDLE_DIST_UT_PORT} server_port_1=$(( PADDLE_DIST_UT_PORT + 1 ))
server_port_1=$(( PADDLE_DIST_UT_PORT + 1 )) worker_port_0=$(( PADDLE_DIST_UT_PORT + 2 ))
echo "server_port_0:${server_port_0} server_port_1=${server_port_1}" worker_port_1=$(( PADDLE_DIST_UT_PORT + 3 ))
python -m paddle.distributed.fleet.launch --server_num=2 --worker_num=2 fleet_ps_training.py 2> ut.elog heter_worker_port_0=$(( PADDLE_DIST_UT_PORT + 4 ))
if grep -q "server are killed" ut.elog; then heter_worker_port_1=$(( PADDLE_DIST_UT_PORT + 5 ))
echo "test pserver launch succeed"
else
echo "test pserver launch failed"
exit -1
fi
python -m paddle.distributed.fleet.launch --servers="127.0.0.1:${server_port_0},127.0.0.1:${server_port_1}" --workers="127.0.0.1:6782,127.0.0.1:6783" fleet_ps_training.py 2> ut.elog function test_launch_ps(){
if grep -q "server are killed" ut.elog; then
echo "test pserver launch succeed"
else
echo "test pserver launch failed"
exit -1
fi
python -m paddle.distributed.fleet.launch --servers="127.0.0.1:${server_port_0},127.0.0.1:${server_port_1}" --workers="127.0.0.1,127.0.0.1" fleet_ps_training.py 2> ut.elog python -m paddle.distributed.fleet.launch \
--servers="127.0.0.1:${server_port_0},127.0.0.1:${server_port_1}" \
--workers="127.0.0.1:${worker_port_0},127.0.0.1:${worker_port_1}" \
fleet_ps_training.py 2> ut.elog
if grep -q "server are killed" ut.elog; then if grep -q "server are killed" ut.elog; then
echo "test pserver launch succeed" echo "test pserver launch succeed"
else else
...@@ -46,7 +38,11 @@ function test_launch_ps(){ ...@@ -46,7 +38,11 @@ function test_launch_ps(){
} }
function test_launch_ps_heter(){ function test_launch_ps_heter(){
python -m paddle.distributed.fleet.launch --server_num=2 --worker_num=2 --heter_worker_num=2 fleet_ps_training.py 2> ut.elog python -m paddle.distributed.fleet.launch \
--servers="127.0.0.1:${server_port_0},127.0.0.1:${server_port_1}" \
--workers="127.0.0.1:${worker_port_0},127.0.0.1:${worker_port_1}" \
--heter_workers="127.0.0.1:${heter_worker_port_0},127.0.0.1:${heter_worker_port_1}" \
fleet_ps_training.py 2> ut.elog
if grep -q "server are killed" ut.elog; then if grep -q "server are killed" ut.elog; then
echo "test heter pserver launch succeed" echo "test heter pserver launch succeed"
else else
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册