From 29ac437525ff57e9ed20e38c0eb9f92e07bb1d1a Mon Sep 17 00:00:00 2001 From: huangju1993 Date: Tue, 19 Apr 2022 09:10:25 +0000 Subject: [PATCH 1/5] update PyTorch/dev/cv/image_classification/DeepLab-CRF_ID1873_for_PyTorch/test/train_full_1p.sh. --- .../DeepLab-CRF_ID1873_for_PyTorch/test/train_full_1p.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PyTorch/dev/cv/image_classification/DeepLab-CRF_ID1873_for_PyTorch/test/train_full_1p.sh b/PyTorch/dev/cv/image_classification/DeepLab-CRF_ID1873_for_PyTorch/test/train_full_1p.sh index a71b37404a..519ac6c41b 100644 --- a/PyTorch/dev/cv/image_classification/DeepLab-CRF_ID1873_for_PyTorch/test/train_full_1p.sh +++ b/PyTorch/dev/cv/image_classification/DeepLab-CRF_ID1873_for_PyTorch/test/train_full_1p.sh @@ -170,7 +170,7 @@ grep "the loss is: " $cur_path/output/$ASCEND_DEVICE_ID/train_$ASCEND_DEVICE_ID. ActualLoss=`awk 'END {print}' $cur_path/output/$ASCEND_DEVICE_ID/train_${CaseName}_loss.txt` #关键信息打印到${CaseName}.log中,不需要修改 -echo "Network = ${Network}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log +echo "Network = ${Network}" > $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log echo "RankSize = ${RANK_SIZE}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log echo "BatchSize = ${BatchSize}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log echo "DeviceType = ${DeviceType}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log -- Gitee From 90a1948d77c21a09bf758de1b8f61516dddd4111 Mon Sep 17 00:00:00 2001 From: huangju1993 Date: Thu, 5 May 2022 05:58:45 +0000 Subject: [PATCH 2/5] update PyTorch/built-in/cv/detection/RetinaNet_for_PyTorch/test/train_full_8p.sh. --- .../RetinaNet_for_PyTorch/test/train_full_8p.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/PyTorch/built-in/cv/detection/RetinaNet_for_PyTorch/test/train_full_8p.sh b/PyTorch/built-in/cv/detection/RetinaNet_for_PyTorch/test/train_full_8p.sh index cfb2d20015..e67b34c6cc 100644 --- a/PyTorch/built-in/cv/detection/RetinaNet_for_PyTorch/test/train_full_8p.sh +++ b/PyTorch/built-in/cv/detection/RetinaNet_for_PyTorch/test/train_full_8p.sh @@ -10,6 +10,16 @@ chmod -R 777 $python_path #当前路径,不需要修改 cur_path=`pwd` +for para in $* +do + if [[ $para == --conda_name* ]];then + conda_name=`echo ${para#*=}` + source set_conda.sh --conda_name=$conda_name + source activate $conda_name + echo "PATH TRAIN AFTER :$PATH" + fi +done + #集合通信参数,不需要修改 RANK_SIZE=8 @@ -121,6 +131,13 @@ do done wait +#退出conda环境 +conda deactivate +if [-n "$conda_name"];then + echo "conda $conda_name deactivate" + conda deactivate +fi + #训练结束时间,不需要修改 end_time=$(date +%s) e2e_time=$(( $end_time - $start_time )) -- Gitee From f8db4bae98f4cc02e012e996e9f34ebe99fbf99f Mon Sep 17 00:00:00 2001 From: huangju1993 Date: Thu, 5 May 2022 05:59:44 +0000 Subject: [PATCH 3/5] add PyTorch/built-in/cv/detection/RetinaNet_for_PyTorch/test/set_conda.sh. --- .../cv/detection/RetinaNet_for_PyTorch/test/set_conda.sh | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 PyTorch/built-in/cv/detection/RetinaNet_for_PyTorch/test/set_conda.sh diff --git a/PyTorch/built-in/cv/detection/RetinaNet_for_PyTorch/test/set_conda.sh b/PyTorch/built-in/cv/detection/RetinaNet_for_PyTorch/test/set_conda.sh new file mode 100644 index 0000000000..d050d95db5 --- /dev/null +++ b/PyTorch/built-in/cv/detection/RetinaNet_for_PyTorch/test/set_conda.sh @@ -0,0 +1,2 @@ +export PATH=/home/anaconda3/bin:$PATH +export LD_LIBRARY_PATH=/home/anaconda3/lib:$LD_LIBRARY_PATH \ No newline at end of file -- Gitee From 355e22409dc71010b35a86207764c7573fcd3dc0 Mon Sep 17 00:00:00 2001 From: huangju1993 Date: Fri, 6 May 2022 09:53:09 +0000 Subject: [PATCH 4/5] update PyTorch/built-in/nlp/Bert-Squad_ID0470_for_PyTorch/test/train_full_8p.sh. --- .../nlp/Bert-Squad_ID0470_for_PyTorch/test/train_full_8p.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PyTorch/built-in/nlp/Bert-Squad_ID0470_for_PyTorch/test/train_full_8p.sh b/PyTorch/built-in/nlp/Bert-Squad_ID0470_for_PyTorch/test/train_full_8p.sh index d7c67c1757..8ff876b4c0 100644 --- a/PyTorch/built-in/nlp/Bert-Squad_ID0470_for_PyTorch/test/train_full_8p.sh +++ b/PyTorch/built-in/nlp/Bert-Squad_ID0470_for_PyTorch/test/train_full_8p.sh @@ -121,7 +121,7 @@ do --seed 1 \ --fp16 \ --loss_scale 4096 \ - --vocab_file "data/uncased_L-24_H-1024_A-16/vocab.txt" \ + --vocab_file ${data_path}/data/uncased_L-24_H-1024_A-16/vocab.txt \ --do_eval \ --eval_script ${data_path}/evaluate-v1.1.py \ --npu_id ${ASCEND_DEVICE_ID} \ -- Gitee From 6537c44eb69d9fe800899790a70481e552f3da56 Mon Sep 17 00:00:00 2001 From: huangju1993 Date: Tue, 10 May 2022 02:23:13 +0000 Subject: [PATCH 5/5] update PyTorch/built-in/cv/detection/RetinaNet_for_PyTorch/test/train_full_8p.sh. --- .../test/train_full_8p.sh | 32 ++++++++----------- 1 file changed, 14 insertions(+), 18 deletions(-) diff --git a/PyTorch/built-in/cv/detection/RetinaNet_for_PyTorch/test/train_full_8p.sh b/PyTorch/built-in/cv/detection/RetinaNet_for_PyTorch/test/train_full_8p.sh index e67b34c6cc..b008126a97 100644 --- a/PyTorch/built-in/cv/detection/RetinaNet_for_PyTorch/test/train_full_8p.sh +++ b/PyTorch/built-in/cv/detection/RetinaNet_for_PyTorch/test/train_full_8p.sh @@ -10,16 +10,6 @@ chmod -R 777 $python_path #当前路径,不需要修改 cur_path=`pwd` -for para in $* -do - if [[ $para == --conda_name* ]];then - conda_name=`echo ${para#*=}` - source set_conda.sh --conda_name=$conda_name - source activate $conda_name - echo "PATH TRAIN AFTER :$PATH" - fi -done - #集合通信参数,不需要修改 RANK_SIZE=8 @@ -75,6 +65,12 @@ do elif [[ $para == --epochs* ]];then epochs=`echo ${para#*=}` fi + if [[ $para == --conda_name* ]];then + conda_name=`echo ${para#*=}` + source set_conda.sh --conda_name=$conda_name + source activate $conda_name + echo "PATH TRAIN AFTER :$PATH" + fi done #校验是否传入data_path,不需要修改 @@ -131,13 +127,6 @@ do done wait -#退出conda环境 -conda deactivate -if [-n "$conda_name"];then - echo "conda $conda_name deactivate" - conda deactivate -fi - #训练结束时间,不需要修改 end_time=$(date +%s) e2e_time=$(( $end_time - $start_time )) @@ -176,4 +165,11 @@ echo "ActualFPS = ${ActualFPS}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName echo "TrainingTime = ${TrainingTime}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log echo "ActualLoss = ${ActualLoss}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log echo "TrainAccuracy = ${train_accuracy}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log -echo "E2ETrainingTime = ${e2e_time}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log \ No newline at end of file +echo "E2ETrainingTime = ${e2e_time}" >> $cur_path/output/$ASCEND_DEVICE_ID/${CaseName}.log + +#退出conda环境 +conda deactivate +if [-n "$conda_name"];then + echo "conda $conda_name deactivate" + conda deactivate +fi \ No newline at end of file -- Gitee