| | |
| | | echo "stage 4: ASR Training" |
| | | |
| | | mkdir -p ${exp_dir}/exp/${model_dir} |
| | | log_file="${exp_dir}/exp/${model_dir}/train.log.txt" |
| | | current_time=$(date "+%Y-%m-%d_%H-%M") |
| | | log_file="${exp_dir}/exp/${model_dir}/train.log.txt.${current_time}" |
| | | echo "log_file: ${log_file}" |
| | | |
| | | gpu_num=$(echo CUDA_VISIBLE_DEVICES | awk -F "," '{print NF}') |
| | | # torchrun \ |
| | | # --nnodes 1 \ |
| | | # --nproc_per_node ${gpu_num} |
| | | cmd="python" |
| | | if [ ${gpu_num} -gt 1 ];then |
| | | cmd="torchrun --nnodes 1 --nproc_per_node ${gpu_num}" |
| | | fi |
| | | ${cmd} \ |
| | | gpu_num=$(echo $CUDA_VISIBLE_DEVICES | awk -F "," '{print NF}') |
| | | torchrun \ |
| | | --nnodes 1 \ |
| | | --nproc_per_node ${gpu_num} \ |
| | | ../../../funasr/bin/train.py \ |
| | | --config-path "${workspace}/conf" \ |
| | | --config-name "${config}" \ |