From 8a44a90396e13f5ba4605c327a9be05226818b51 Mon Sep 17 00:00:00 2001 From: stephon Date: Wed, 9 Feb 2022 09:24:49 +0000 Subject: [PATCH] add fleet tests --- .../test_tipc/test_train_python.sh | 3 ++- .../test_tipc/train_infer_python_FPGM.txt | 4 ++-- .../test_tipc/train_infer_python_FPGM_fleet.txt | 17 +++++++++++++++++ .../test_tipc/train_infer_python_PACT.txt | 4 ++-- .../test_tipc/train_infer_python_PACT_fleet.txt | 17 +++++++++++++++++ .../test_tipc/train_infer_python_fleet.txt | 3 +-- 6 files changed, 41 insertions(+), 7 deletions(-) create mode 100644 test_tipc/supplementary/test_tipc/train_infer_python_FPGM_fleet.txt create mode 100644 test_tipc/supplementary/test_tipc/train_infer_python_PACT_fleet.txt diff --git a/test_tipc/supplementary/test_tipc/test_train_python.sh b/test_tipc/supplementary/test_tipc/test_train_python.sh index f922b57b..ed709c1c 100644 --- a/test_tipc/supplementary/test_tipc/test_train_python.sh +++ b/test_tipc/supplementary/test_tipc/test_train_python.sh @@ -35,7 +35,6 @@ use_share_conv_key=$(func_parser_key "${lines[13]}") use_share_conv_list=$(func_parser_value "${lines[13]}") run_train_py=$(func_parser_value "${lines[14]}") - LOG_PATH="./test_tipc/extra_output" mkdir -p ${LOG_PATH} status_log="${LOG_PATH}/results_python.log" @@ -98,6 +97,8 @@ if [ ${MODE} = "lite_train_lite_infer" ] || [ ${MODE} = "whole_train_whole_infer cmd="${python} ${run_train_py} ${set_use_gpu} ${set_save_model} ${set_epoch} ${set_pretrain} ${set_checkpoints} ${set_autocast} ${set_batchsize} ${set_use_custom_op} ${set_model_type} ${set_use_share_conv} ${set_amp_config}" elif [ ${#ips} -le 26 ];then # train with multi-gpu cmd="${python} -m paddle.distributed.launch --gpus=${gpu} ${run_train_py} ${set_use_gpu} ${set_save_model} ${set_epoch} ${set_pretrain} ${set_checkpoints} ${set_autocast} ${set_batchsize} ${set_use_custom_op} ${set_model_type} ${set_use_share_conv} ${set_amp_config}" + else + cmd="${python} -m paddle.distributed.launch --ips=${ips} --gpus=${gpu} ${run_train_py} ${set_use_gpu} ${set_save_model} ${set_epoch} ${set_pretrain} ${set_checkpoints} ${set_autocast} ${set_batchsize} ${set_use_custom_op} ${set_model_type} ${set_use_share_conv} ${set_amp_config}" fi # run train diff --git a/test_tipc/supplementary/test_tipc/train_infer_python_FPGM.txt b/test_tipc/supplementary/test_tipc/train_infer_python_FPGM.txt index 4c2e28b9..ccbd27ff 100644 --- a/test_tipc/supplementary/test_tipc/train_infer_python_FPGM.txt +++ b/test_tipc/supplementary/test_tipc/train_infer_python_FPGM.txt @@ -4,9 +4,9 @@ python:python3.7 gpu_list:0|0,1 use_gpu:True|True AMP.use_amp:True|False -epoch:lite_train_lite_infer=20|whole_train_whole_infer=1000 +epoch:lite_train_lite_infer=2|whole_train_whole_infer=1000 save_model_dir:./output/ -TRAIN.batch_size:lite_train_lite_infer=2|whole_train_whole_infer=4 +TRAIN.batch_size:lite_train_lite_infer=1280|whole_train_whole_infer=1280 pretrained_model:null checkpoints:null use_custom_relu:False|True diff --git a/test_tipc/supplementary/test_tipc/train_infer_python_FPGM_fleet.txt b/test_tipc/supplementary/test_tipc/train_infer_python_FPGM_fleet.txt new file mode 100644 index 00000000..be2b2117 --- /dev/null +++ b/test_tipc/supplementary/test_tipc/train_infer_python_FPGM_fleet.txt @@ -0,0 +1,17 @@ +===========================train_params=========================== +model_name:ch_PPOCRv2_det +python:python3.7 +gpu_list:xx.xx.xx.xx,yy.yy.yy.yy;0,1 +use_gpu:True +AMP.use_amp:True|False +epoch:lite_train_lite_infer=2|whole_train_whole_infer=1000 +save_model_dir:./output/ +TRAIN.batch_size:lite_train_lite_infer=1280|whole_train_whole_infer=1280 +pretrained_model:null +checkpoints:null +use_custom_relu:False|True +model_type:cls|cls_distill|cls_distill_multiopt +MODEL.siamese:False|True +norm_train:train.py -c mv3_large_x0_5.yml -o prune_train=True +quant_train:False +prune_train:False diff --git a/test_tipc/supplementary/test_tipc/train_infer_python_PACT.txt b/test_tipc/supplementary/test_tipc/train_infer_python_PACT.txt index 079cddf8..24d291b4 100644 --- a/test_tipc/supplementary/test_tipc/train_infer_python_PACT.txt +++ b/test_tipc/supplementary/test_tipc/train_infer_python_PACT.txt @@ -4,9 +4,9 @@ python:python3.7 gpu_list:0|0,1 use_gpu:True|True AMP.use_amp:True|False -epoch:lite_train_lite_infer=20|whole_train_whole_infer=1000 +epoch:lite_train_lite_infer=2|whole_train_whole_infer=1000 save_model_dir:./output/ -TRAIN.batch_size:lite_train_lite_infer=2|whole_train_whole_infer=4 +TRAIN.batch_size:lite_train_lite_infer=1280|whole_train_whole_infer=1280 pretrained_model:null checkpoints:null use_custom_relu:False|True diff --git a/test_tipc/supplementary/test_tipc/train_infer_python_PACT_fleet.txt b/test_tipc/supplementary/test_tipc/train_infer_python_PACT_fleet.txt new file mode 100644 index 00000000..93f06d76 --- /dev/null +++ b/test_tipc/supplementary/test_tipc/train_infer_python_PACT_fleet.txt @@ -0,0 +1,17 @@ +===========================train_params=========================== +model_name:ch_PPOCRv2_det +python:python3.7 +gpu_list:xx.xx.xx.xx,yy.yy.yy.yy;0,1 +use_gpu:True +AMP.use_amp:True|False +epoch:lite_train_lite_infer=2|whole_train_whole_infer=1000 +save_model_dir:./output/ +TRAIN.batch_size:lite_train_lite_infer=1280|whole_train_whole_infer=1280 +pretrained_model:null +checkpoints:null +use_custom_relu:False|True +model_type:cls|cls_distill|cls_distill_multiopt +MODEL.siamese:False|True +norm_train:train.py -c mv3_large_x0_5.yml -o quant_train=True +quant_train:False +prune_train:False diff --git a/test_tipc/supplementary/test_tipc/train_infer_python_fleet.txt b/test_tipc/supplementary/test_tipc/train_infer_python_fleet.txt index b095f02c..00b9e823 100644 --- a/test_tipc/supplementary/test_tipc/train_infer_python_fleet.txt +++ b/test_tipc/supplementary/test_tipc/train_infer_python_fleet.txt @@ -12,7 +12,6 @@ checkpoints:null use_custom_relu:False|True model_type:cls|cls_distill|cls_distill_multiopt MODEL.siamese:False|True -norm_train:train.py -c mv3_large_x0_5.yml -o +norm_train: train.py -c mv3_large_x0_5.yml -o quant_train:False prune_train:False - -- GitLab