未验证 提交 9a47b11d 编写于 作者: W wangzhen38 提交者: GitHub

[BUG FIX] fix gpups ci (#50192)

上级 2755507c
......@@ -4,12 +4,16 @@ file(
"test_*.py")
string(REPLACE ".py" "" TEST_OPS "${TEST_OPS}")
if(NOT WITH_HETERPS)
list(REMOVE_ITEM TEST_OPS "test_gpubox_ps")
endif()
foreach(TEST_OP ${TEST_OPS})
py_test_modules(${TEST_OP} MODULES ${TEST_OP})
list(APPEND TEST_OPS ${TEST_OP})
set_tests_properties(${TEST_OP} PROPERTIES TIMEOUT 50)
endforeach()
if(WITH_PSCORE)
if(WITH_HETERPS)
set_tests_properties(test_gpubox_ps PROPERTIES LABELS "RUN_TYPE=GPUPS")
endif()
......@@ -31,8 +31,8 @@ export PADDLE_PSERVERS_IP_PORT_LIST="127.0.0.1:29011"
export PADDLE_PSERVER_PORT_ARRAY=(29011)
# set gpu numbers according to your device
export FLAGS_selected_gpus="0,1,2,3,4,5,6,7"
#export FLAGS_selected_gpus="0,1"
#export FLAGS_selected_gpus="0,1,2,3,4,5,6,7"
export FLAGS_selected_gpus="0,1"
# set your model yaml
#SC="gpubox_ps_trainer.py"
......@@ -57,4 +57,8 @@ do
python3.7 -u $SC &> ./log/worker.$i.log
done
if [ $? -eq 0 ];then
echo "Training log stored in ./log/"
else
exit 1
fi
......@@ -21,15 +21,16 @@ import unittest
class GpuBoxTest(unittest.TestCase):
def test_gpubox(self):
exitcode = os.system('sh gpubox_run.sh')
os.system('rm *_train_desc.prototxt')
if not os.path.exists('./train_data'):
os.system('bash download_criteo_data.sh')
exitcode = os.system('bash gpubox_run.sh')
if os.path.exists('./train_data'):
os.system('rm -rf train_data')
if os.path.exists('./log'):
os.system('rm -rf log')
assert exitcode == 0
if __name__ == '__main__':
if not os.path.exists('./train_data'):
os.system('sh download_criteo_data.sh')
unittest.main()
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册