From 5fd2333c9130681b6d5153c764c815773d80dd83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eren=20G=C3=B6lge?= Date: Fri, 9 Apr 2021 03:07:58 +0200 Subject: [PATCH] move bash based tests to a separate folder and rename the calling script file. Fix align_tts training test. --- run_bash_tests.sh | 14 +++++++++++ run_tests.sh | 20 ---------------- tests/{ => bash_tests}/test_aligntts_train.sh | 8 +++---- .../test_compute_statistics.sh | 2 +- tests/{ => bash_tests}/test_demo_server.sh | 0 tests/{ => bash_tests}/test_glow-tts_train.sh | 8 +++---- tests/{ => bash_tests}/test_resample.sh | 2 +- .../test_speedy_speech_train.sh | 8 +++---- tests/{ => bash_tests}/test_tacotron_train.sh | 24 +++++++++---------- .../test_vocoder_gan_train.sh | 10 ++++---- .../test_vocoder_wavegrad_train.sh | 10 ++++---- .../test_vocoder_wavernn_train.sh | 10 ++++---- tests/inputs/test_align_tts.json | 2 +- 13 files changed, 56 insertions(+), 62 deletions(-) create mode 100644 run_bash_tests.sh delete mode 100755 run_tests.sh rename tests/{ => bash_tests}/test_aligntts_train.sh (61%) rename tests/{ => bash_tests}/test_compute_statistics.sh (60%) mode change 100755 => 100644 rename tests/{ => bash_tests}/test_demo_server.sh (100%) mode change 100755 => 100644 rename tests/{ => bash_tests}/test_glow-tts_train.sh (62%) mode change 100755 => 100644 rename tests/{ => bash_tests}/test_resample.sh (78%) mode change 100755 => 100644 rename tests/{ => bash_tests}/test_speedy_speech_train.sh (60%) mode change 100755 => 100644 rename tests/{ => bash_tests}/test_tacotron_train.sh (58%) mode change 100755 => 100644 rename tests/{ => bash_tests}/test_vocoder_gan_train.sh (55%) mode change 100755 => 100644 rename tests/{ => bash_tests}/test_vocoder_wavegrad_train.sh (55%) mode change 100755 => 100644 rename tests/{ => bash_tests}/test_vocoder_wavernn_train.sh (55%) mode change 100755 => 100644 diff --git a/run_bash_tests.sh b/run_bash_tests.sh new file mode 100644 index 00000000..408b5f9f --- /dev/null +++ b/run_bash_tests.sh @@ -0,0 +1,14 @@ +set -e +TF_CPP_MIN_LOG_LEVEL=3 + +# runtime bash based tests +./tests/bash_tests/test_demo_server.sh && \ +./tests/bash_tests/test_resample.sh && \ +./tests/bash_tests/test_tacotron_train.sh && \ +./tests/bash_tests/test_glow-tts_train.sh && \ +./tests/bash_tests/test_vocoder_gan_train.sh && \ +./tests/bash_tests/test_vocoder_wavernn_train.sh && \ +./tests/bash_tests/test_vocoder_wavegrad_train.sh && \ +./tests/bash_tests/test_speedy_speech_train.sh && \ +./tests/bash_tests/test_aligntts_train.sh && \ +./tests/bash_tests/test_compute_statistics.sh && \ \ No newline at end of file diff --git a/run_tests.sh b/run_tests.sh deleted file mode 100755 index 18812318..00000000 --- a/run_tests.sh +++ /dev/null @@ -1,20 +0,0 @@ -set -e -TF_CPP_MIN_LOG_LEVEL=3 - -# # tests -nosetests tests -x &&\ - -# runtime tests -./tests/test_demo_server.sh && \ -./tests/test_resample.sh && \ -./tests/test_tacotron_train.sh && \ -./tests/test_glow-tts_train.sh && \ -./tests/test_vocoder_gan_train.sh && \ -./tests/test_vocoder_wavernn_train.sh && \ -./tests/test_vocoder_wavegrad_train.sh && \ -./tests/test_speedy_speech_train.sh && \ -./tests/test_aligntts_train.sh && \ -./tests/test_compute_statistics.sh && \ - -# linter check -cardboardlinter --refspec main diff --git a/tests/test_aligntts_train.sh b/tests/bash_tests/test_aligntts_train.sh similarity index 61% rename from tests/test_aligntts_train.sh rename to tests/bash_tests/test_aligntts_train.sh index 22e6ff12..38d46520 100644 --- a/tests/test_aligntts_train.sh +++ b/tests/bash_tests/test_aligntts_train.sh @@ -3,11 +3,11 @@ set -xe BASEDIR=$(dirname "$0") echo "$BASEDIR" # run training -CUDA_VISIBLE_DEVICES="" python TTS/bin/train_align_tts.py --config_path $BASEDIR/inputs/test_align_tts.json +CUDA_VISIBLE_DEVICES="" python TTS/bin/train_align_tts.py --config_path $BASEDIR/../inputs/test_align_tts.json # find the training folder -LATEST_FOLDER=$(ls $BASEDIR/train_outputs/| sort | tail -1) +LATEST_FOLDER=$(ls $BASEDIR/../train_outputs/| sort | tail -1) echo $LATEST_FOLDER # continue the previous training -CUDA_VISIBLE_DEVICES="" python TTS/bin/train_align_tts.py --continue_path $BASEDIR/train_outputs/$LATEST_FOLDER +CUDA_VISIBLE_DEVICES="" python TTS/bin/train_align_tts.py --continue_path $BASEDIR/../train_outputs/$LATEST_FOLDER # remove all the outputs -rm -rf $BASEDIR/train_outputs/ +rm -rf $BASEDIR/../train_outputs/ diff --git a/tests/test_compute_statistics.sh b/tests/bash_tests/test_compute_statistics.sh old mode 100755 new mode 100644 similarity index 60% rename from tests/test_compute_statistics.sh rename to tests/bash_tests/test_compute_statistics.sh index c2b32282..d7f0ab9d --- a/tests/test_compute_statistics.sh +++ b/tests/bash_tests/test_compute_statistics.sh @@ -3,5 +3,5 @@ set -xe BASEDIR=$(dirname "$0") echo "$BASEDIR" # run training -CUDA_VISIBLE_DEVICES="" python TTS/bin/compute_statistics.py --config_path $BASEDIR/inputs/test_glow_tts.json --out_path $BASEDIR/outputs/scale_stats.npy +CUDA_VISIBLE_DEVICES="" python TTS/bin/compute_statistics.py --config_path $BASEDIR/../inputs/test_glow_tts.json --out_path $BASEDIR/../outputs/scale_stats.npy diff --git a/tests/test_demo_server.sh b/tests/bash_tests/test_demo_server.sh old mode 100755 new mode 100644 similarity index 100% rename from tests/test_demo_server.sh rename to tests/bash_tests/test_demo_server.sh diff --git a/tests/test_glow-tts_train.sh b/tests/bash_tests/test_glow-tts_train.sh old mode 100755 new mode 100644 similarity index 62% rename from tests/test_glow-tts_train.sh rename to tests/bash_tests/test_glow-tts_train.sh index add7292d..04aef2ad --- a/tests/test_glow-tts_train.sh +++ b/tests/bash_tests/test_glow-tts_train.sh @@ -3,11 +3,11 @@ set -xe BASEDIR=$(dirname "$0") echo "$BASEDIR" # run training -CUDA_VISIBLE_DEVICES="" python TTS/bin/train_glow_tts.py --config_path $BASEDIR/inputs/test_glow_tts.json +CUDA_VISIBLE_DEVICES="" python TTS/bin/train_glow_tts.py --config_path $BASEDIR/../inputs/test_glow_tts.json # find the training folder -LATEST_FOLDER=$(ls $BASEDIR/train_outputs/| sort | tail -1) +LATEST_FOLDER=$(ls $BASEDIR/../train_outputs/| sort | tail -1) echo $LATEST_FOLDER # continue the previous training -CUDA_VISIBLE_DEVICES="" python TTS/bin/train_glow_tts.py --continue_path $BASEDIR/train_outputs/$LATEST_FOLDER +CUDA_VISIBLE_DEVICES="" python TTS/bin/train_glow_tts.py --continue_path $BASEDIR/../train_outputs/$LATEST_FOLDER # remove all the outputs -rm -rf $BASEDIR/train_outputs/ +rm -rf $BASEDIR/../train_outputs/ diff --git a/tests/test_resample.sh b/tests/bash_tests/test_resample.sh old mode 100755 new mode 100644 similarity index 78% rename from tests/test_resample.sh rename to tests/bash_tests/test_resample.sh index ddae17ad..ba871272 --- a/tests/test_resample.sh +++ b/tests/bash_tests/test_resample.sh @@ -4,7 +4,7 @@ BASEDIR=$(dirname "$0") TARGET_SR=16000 echo "$BASEDIR" #run the resample script -python TTS/bin/resample.py --input_dir $BASEDIR/data/ljspeech --output_dir $BASEDIR/outputs/resample_tests --output_sr $TARGET_SR +python TTS/bin/resample.py --input_dir $BASEDIR/../data/ljspeech --output_dir $BASEDIR/outputs/resample_tests --output_sr $TARGET_SR #check samplerate of output OUT_SR=$( (echo "import librosa" ; echo "y, sr = librosa.load('"$BASEDIR"/outputs/resample_tests/wavs/LJ001-0012.wav', sr=None)" ; echo "print(sr)") | python ) OUT_SR=$(($OUT_SR + 0)) diff --git a/tests/test_speedy_speech_train.sh b/tests/bash_tests/test_speedy_speech_train.sh old mode 100755 new mode 100644 similarity index 60% rename from tests/test_speedy_speech_train.sh rename to tests/bash_tests/test_speedy_speech_train.sh index e0c85000..2276034f --- a/tests/test_speedy_speech_train.sh +++ b/tests/bash_tests/test_speedy_speech_train.sh @@ -3,11 +3,11 @@ set -xe BASEDIR=$(dirname "$0") echo "$BASEDIR" # run training -CUDA_VISIBLE_DEVICES="" python TTS/bin/train_speedy_speech.py --config_path $BASEDIR/inputs/test_speedy_speech.json +CUDA_VISIBLE_DEVICES="" python TTS/bin/train_speedy_speech.py --config_path $BASEDIR/../inputs/test_speedy_speech.json # find the training folder -LATEST_FOLDER=$(ls $BASEDIR/train_outputs/| sort | tail -1) +LATEST_FOLDER=$(ls $BASEDIR/../train_outputs/| sort | tail -1) echo $LATEST_FOLDER # continue the previous training -CUDA_VISIBLE_DEVICES="" python TTS/bin/train_speedy_speech.py --continue_path $BASEDIR/train_outputs/$LATEST_FOLDER +CUDA_VISIBLE_DEVICES="" python TTS/bin/train_speedy_speech.py --continue_path $BASEDIR/../train_outputs/$LATEST_FOLDER # remove all the outputs -rm -rf $BASEDIR/train_outputs/ +rm -rf $BASEDIR/../train_outputs/ diff --git a/tests/test_tacotron_train.sh b/tests/bash_tests/test_tacotron_train.sh old mode 100755 new mode 100644 similarity index 58% rename from tests/test_tacotron_train.sh rename to tests/bash_tests/test_tacotron_train.sh index e0a0253b..4aacf69c --- a/tests/test_tacotron_train.sh +++ b/tests/bash_tests/test_tacotron_train.sh @@ -4,33 +4,33 @@ BASEDIR=$(dirname "$0") echo "$BASEDIR" # run training -CUDA_VISIBLE_DEVICES="" python TTS/bin/train_tacotron.py --config_path $BASEDIR/inputs/test_tacotron_config.json +CUDA_VISIBLE_DEVICES="" python TTS/bin/train_tacotron.py --config_path $BASEDIR/../inputs/test_tacotron_config.json # find the training folder -LATEST_FOLDER=$(ls $BASEDIR/train_outputs/| sort | tail -1) +LATEST_FOLDER=$(ls $BASEDIR/../train_outputs/| sort | tail -1) echo $LATEST_FOLDER # continue the previous training -CUDA_VISIBLE_DEVICES="" python TTS/bin/train_tacotron.py --continue_path $BASEDIR/train_outputs/$LATEST_FOLDER +CUDA_VISIBLE_DEVICES="" python TTS/bin/train_tacotron.py --continue_path $BASEDIR/../train_outputs/$LATEST_FOLDER # remove all the outputs -rm -rf $BASEDIR/train_outputs/ +rm -rf $BASEDIR/../train_outputs/ # run Tacotron bi-directional decoder -CUDA_VISIBLE_DEVICES="" python TTS/bin/train_tacotron.py --config_path $BASEDIR/inputs/test_tacotron_bd_config.json +CUDA_VISIBLE_DEVICES="" python TTS/bin/train_tacotron.py --config_path $BASEDIR/../inputs/test_tacotron_bd_config.json # find the training folder -LATEST_FOLDER=$(ls $BASEDIR/train_outputs/| sort | tail -1) +LATEST_FOLDER=$(ls $BASEDIR/../train_outputs/| sort | tail -1) echo $LATEST_FOLDER # continue the previous training -CUDA_VISIBLE_DEVICES="" python TTS/bin/train_tacotron.py --continue_path $BASEDIR/train_outputs/$LATEST_FOLDER +CUDA_VISIBLE_DEVICES="" python TTS/bin/train_tacotron.py --continue_path $BASEDIR/../train_outputs/$LATEST_FOLDER # remove all the outputs -rm -rf $BASEDIR/train_outputs/ +rm -rf $BASEDIR/../train_outputs/ # Tacotron2 # run training -CUDA_VISIBLE_DEVICES="" python TTS/bin/train_tacotron.py --config_path $BASEDIR/inputs/test_tacotron2_config.json +CUDA_VISIBLE_DEVICES="" python TTS/bin/train_tacotron.py --config_path $BASEDIR/../inputs/test_tacotron2_config.json # find the training folder -LATEST_FOLDER=$(ls $BASEDIR/train_outputs/| sort | tail -1) +LATEST_FOLDER=$(ls $BASEDIR/../train_outputs/| sort | tail -1) echo $LATEST_FOLDER # continue the previous training -CUDA_VISIBLE_DEVICES="" python TTS/bin/train_tacotron.py --continue_path $BASEDIR/train_outputs/$LATEST_FOLDER +CUDA_VISIBLE_DEVICES="" python TTS/bin/train_tacotron.py --continue_path $BASEDIR/../train_outputs/$LATEST_FOLDER # remove all the outputs -rm -rf $BASEDIR/train_outputs/ +rm -rf $BASEDIR/../train_outputs/ diff --git a/tests/test_vocoder_gan_train.sh b/tests/bash_tests/test_vocoder_gan_train.sh old mode 100755 new mode 100644 similarity index 55% rename from tests/test_vocoder_gan_train.sh rename to tests/bash_tests/test_vocoder_gan_train.sh index 0ed2b599..b2f43721 --- a/tests/test_vocoder_gan_train.sh +++ b/tests/bash_tests/test_vocoder_gan_train.sh @@ -3,13 +3,13 @@ set -xe BASEDIR=$(dirname "$0") echo "$BASEDIR" # create run dir -mkdir $BASEDIR/train_outputs +mkdir $BASEDIR/../train_outputs # run training -CUDA_VISIBLE_DEVICES="" python TTS/bin/train_vocoder_gan.py --config_path $BASEDIR/inputs/test_vocoder_multiband_melgan_config.json +CUDA_VISIBLE_DEVICES="" python TTS/bin/train_vocoder_gan.py --config_path $BASEDIR/../inputs/test_vocoder_multiband_melgan_config.json # find the training folder -LATEST_FOLDER=$(ls $BASEDIR/train_outputs/| sort | tail -1) +LATEST_FOLDER=$(ls $BASEDIR/../train_outputs/| sort | tail -1) echo $LATEST_FOLDER # continue the previous training -CUDA_VISIBLE_DEVICES="" python TTS/bin/train_vocoder_gan.py --continue_path $BASEDIR/train_outputs/$LATEST_FOLDER +CUDA_VISIBLE_DEVICES="" python TTS/bin/train_vocoder_gan.py --continue_path $BASEDIR/../train_outputs/$LATEST_FOLDER # remove all the outputs -rm -rf $BASEDIR/train_outputs/$LATEST_FOLDER +rm -rf $BASEDIR/../train_outputs/$LATEST_FOLDER diff --git a/tests/test_vocoder_wavegrad_train.sh b/tests/bash_tests/test_vocoder_wavegrad_train.sh old mode 100755 new mode 100644 similarity index 55% rename from tests/test_vocoder_wavegrad_train.sh rename to tests/bash_tests/test_vocoder_wavegrad_train.sh index 33ffe865..9626187f --- a/tests/test_vocoder_wavegrad_train.sh +++ b/tests/bash_tests/test_vocoder_wavegrad_train.sh @@ -3,13 +3,13 @@ set -xe BASEDIR=$(dirname "$0") echo "$BASEDIR" # create run dir -mkdir -p $BASEDIR/train_outputs +mkdir -p $BASEDIR/../train_outputs # run training -CUDA_VISIBLE_DEVICES="" python TTS/bin/train_vocoder_wavegrad.py --config_path $BASEDIR/inputs/test_vocoder_wavegrad.json +CUDA_VISIBLE_DEVICES="" python TTS/bin/train_vocoder_wavegrad.py --config_path $BASEDIR/../inputs/test_vocoder_wavegrad.json # find the training folder -LATEST_FOLDER=$(ls $BASEDIR/train_outputs/| sort | tail -1) +LATEST_FOLDER=$(ls $BASEDIR/../train_outputs/| sort | tail -1) echo $LATEST_FOLDER # continue the previous training -CUDA_VISIBLE_DEVICES="" python TTS/bin/train_vocoder_wavegrad.py --continue_path $BASEDIR/train_outputs/$LATEST_FOLDER +CUDA_VISIBLE_DEVICES="" python TTS/bin/train_vocoder_wavegrad.py --continue_path $BASEDIR/../train_outputs/$LATEST_FOLDER # remove all the outputs -rm -rf $BASEDIR/train_outputs/$LATEST_FOLDER \ No newline at end of file +rm -rf $BASEDIR/../train_outputs/$LATEST_FOLDER \ No newline at end of file diff --git a/tests/test_vocoder_wavernn_train.sh b/tests/bash_tests/test_vocoder_wavernn_train.sh old mode 100755 new mode 100644 similarity index 55% rename from tests/test_vocoder_wavernn_train.sh rename to tests/bash_tests/test_vocoder_wavernn_train.sh index 40e86012..7b554fc9 --- a/tests/test_vocoder_wavernn_train.sh +++ b/tests/bash_tests/test_vocoder_wavernn_train.sh @@ -3,13 +3,13 @@ set -xe BASEDIR=$(dirname "$0") echo "$BASEDIR" # create run dir -mkdir -p $BASEDIR/train_outputs +mkdir -p $BASEDIR/../train_outputs # run training -CUDA_VISIBLE_DEVICES="" python TTS/bin/train_vocoder_wavernn.py --config_path $BASEDIR/inputs/test_vocoder_wavernn_config.json +CUDA_VISIBLE_DEVICES="" python TTS/bin/train_vocoder_wavernn.py --config_path $BASEDIR/../inputs/test_vocoder_wavernn_config.json # find the training folder -LATEST_FOLDER=$(ls $BASEDIR/train_outputs/| sort | tail -1) +LATEST_FOLDER=$(ls $BASEDIR/../train_outputs/| sort | tail -1) echo $LATEST_FOLDER # continue the previous training -CUDA_VISIBLE_DEVICES="" python TTS/bin/train_vocoder_wavernn.py --continue_path $BASEDIR/train_outputs/$LATEST_FOLDER +CUDA_VISIBLE_DEVICES="" python TTS/bin/train_vocoder_wavernn.py --continue_path $BASEDIR/../train_outputs/$LATEST_FOLDER # remove all the outputs -rm -rf $BASEDIR/train_outputs/$LATEST_FOLDER \ No newline at end of file +rm -rf $BASEDIR/../train_outputs/$LATEST_FOLDER \ No newline at end of file diff --git a/tests/inputs/test_align_tts.json b/tests/inputs/test_align_tts.json index 7b2487bf..964cc66d 100644 --- a/tests/inputs/test_align_tts.json +++ b/tests/inputs/test_align_tts.json @@ -87,7 +87,7 @@ "eval_batch_size":1, "r": 1, // Number of decoder frames to predict per iteration. Set the initial values if gradual training is enabled. "loss_masking": true, // enable / disable loss masking against the sequence padding. - "phase_start_steps": [0, 40000, 80000, 160000, 170000], + "phase_start_steps": null, // LOSS PARAMETERS