From 07d2c39138805d8eb15f481c4c5511a2cb89f895 Mon Sep 17 00:00:00 2001 From: Reuben Morais Date: Mon, 8 Jun 2020 15:37:06 +0200 Subject: [PATCH] Split SDB tests from basic training tests to speed up CI dependents --- taskcluster/tc-train-extra-tests.sh | 60 +++++++++++++++++++ taskcluster/tc-train-tests.sh | 6 -- ...aining-extra_16k-linux-amd64-py35m-opt.yml | 12 ++++ ...aining-extra_16k-linux-amd64-py36m-opt.yml | 12 ++++ ...aining-extra_16k-linux-amd64-py37m-opt.yml | 12 ++++ ...raining-extra_8k-linux-amd64-py36m-opt.yml | 12 ++++ ...raining-extra_8k-linux-amd64-py37m-opt.yml | 12 ++++ ...est-training_16k-linux-amd64-py35m-opt.yml | 2 +- ...est-training_16k-linux-amd64-py36m-opt.yml | 2 +- ...est-training_16k-linux-amd64-py37m-opt.yml | 2 +- ...test-training_8k-linux-amd64-py36m-opt.yml | 2 +- ...test-training_8k-linux-amd64-py37m-opt.yml | 2 +- 12 files changed, 125 insertions(+), 11 deletions(-) create mode 100644 taskcluster/tc-train-extra-tests.sh create mode 100644 taskcluster/test-training-extra_16k-linux-amd64-py35m-opt.yml create mode 100644 taskcluster/test-training-extra_16k-linux-amd64-py36m-opt.yml create mode 100644 taskcluster/test-training-extra_16k-linux-amd64-py37m-opt.yml create mode 100644 taskcluster/test-training-extra_8k-linux-amd64-py36m-opt.yml create mode 100644 taskcluster/test-training-extra_8k-linux-amd64-py37m-opt.yml diff --git a/taskcluster/tc-train-extra-tests.sh b/taskcluster/tc-train-extra-tests.sh new file mode 100644 index 00000000..dfdcf9dd --- /dev/null +++ b/taskcluster/tc-train-extra-tests.sh @@ -0,0 +1,60 @@ +#!/bin/bash + +set -xe + +source $(dirname "$0")/tc-tests-utils.sh + +extract_python_versions "$1" "pyver" "pyver_pkg" "py_unicode_type" "pyconf" "pyalias" + +bitrate=$2 + +decoder_src=$3 + +if [ "$decoder_src" = "--pypi" ]; then + # Disable automatically picking up decoder package built in this CI group + export DECODER_ARTIFACTS_ROOT="" +fi + +mkdir -p ${TASKCLUSTER_ARTIFACTS} || true +mkdir -p /tmp/train || true +mkdir -p /tmp/train_tflite || true + +virtualenv_activate "${pyalias}" "deepspeech" + +set -o pipefail +pip install --upgrade pip==19.3.1 setuptools==45.0.0 wheel==0.33.6 | cat +pushd ${HOME}/DeepSpeech/ds + pip install --upgrade . | cat +popd +set +o pipefail + +# Prepare correct arguments for training +case "${bitrate}" in + 8k) + sample_rate=8000 + sample_name='LDC93S1_pcms16le_1_8000.wav' + ;; + 16k) + sample_rate=16000 + sample_name='LDC93S1_pcms16le_1_16000.wav' + ;; +esac + +# Easier to rename to that we can exercize the LDC93S1 importer code to +# generate the CSV file. +echo "Moving ${sample_name} to LDC93S1.wav" +mv "${DS_ROOT_TASK}/DeepSpeech/ds/data/smoke_test/${sample_name}" "${DS_ROOT_TASK}/DeepSpeech/ds/data/smoke_test/LDC93S1.wav" + +pushd ${HOME}/DeepSpeech/ds/ + # Testing single SDB source + time ./bin/run-tc-ldc93s1_new_sdb.sh 220 "${sample_rate}" + # Testing interleaved source (SDB+CSV combination) - run twice to test preprocessed features + time ./bin/run-tc-ldc93s1_new_sdb_csv.sh 109 "${sample_rate}" + time ./bin/run-tc-ldc93s1_new_sdb_csv.sh 1 "${sample_rate}" +popd + +pushd ${HOME}/DeepSpeech/ds/ + time ./bin/run-tc-ldc93s1_checkpoint_sdb.sh +popd + +virtualenv_deactivate "${pyalias}" "deepspeech" diff --git a/taskcluster/tc-train-tests.sh b/taskcluster/tc-train-tests.sh index 3b681dcd..f9394935 100644 --- a/taskcluster/tc-train-tests.sh +++ b/taskcluster/tc-train-tests.sh @@ -50,11 +50,6 @@ pushd ${HOME}/DeepSpeech/ds/ time ./bin/run-tc-ldc93s1_new.sh 249 "${sample_rate}" time ./bin/run-tc-ldc93s1_new.sh 1 "${sample_rate}" time ./bin/run-tc-ldc93s1_tflite.sh "${sample_rate}" - # Testing single SDB source - time ./bin/run-tc-ldc93s1_new_sdb.sh 220 "${sample_rate}" - # Testing interleaved source (SDB+CSV combination) - run twice to test preprocessed features - time ./bin/run-tc-ldc93s1_new_sdb_csv.sh 109 "${sample_rate}" - time ./bin/run-tc-ldc93s1_new_sdb_csv.sh 1 "${sample_rate}" popd cp /tmp/train/output_graph.pb ${TASKCLUSTER_ARTIFACTS} @@ -69,7 +64,6 @@ cp /tmp/train/output_graph.pbmm ${TASKCLUSTER_ARTIFACTS} pushd ${HOME}/DeepSpeech/ds/ time ./bin/run-tc-ldc93s1_checkpoint.sh - time ./bin/run-tc-ldc93s1_checkpoint_sdb.sh popd virtualenv_deactivate "${pyalias}" "deepspeech" diff --git a/taskcluster/test-training-extra_16k-linux-amd64-py35m-opt.yml b/taskcluster/test-training-extra_16k-linux-amd64-py35m-opt.yml new file mode 100644 index 00000000..6d19f491 --- /dev/null +++ b/taskcluster/test-training-extra_16k-linux-amd64-py35m-opt.yml @@ -0,0 +1,12 @@ +build: + template_file: test-linux-opt-base.tyml + dependencies: + - "linux-amd64-ctc-opt" + system_setup: + > + apt-get -qq update && apt-get -qq -y install ${training.packages_trusty.apt} + args: + tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/taskcluster/tc-train-extra-tests.sh 3.5.8:m 16k" + metadata: + name: "DeepSpeech Linux AMD64 CPU 8kHz all training features Py3.7" + description: "Training (all features) a DeepSpeech LDC93S1 model for Linux/AMD64 8kHz Python 3.7, CPU only, optimized version" diff --git a/taskcluster/test-training-extra_16k-linux-amd64-py36m-opt.yml b/taskcluster/test-training-extra_16k-linux-amd64-py36m-opt.yml new file mode 100644 index 00000000..e292a841 --- /dev/null +++ b/taskcluster/test-training-extra_16k-linux-amd64-py36m-opt.yml @@ -0,0 +1,12 @@ +build: + template_file: test-linux-opt-base.tyml + dependencies: + - "linux-amd64-ctc-opt" + system_setup: + > + apt-get -qq update && apt-get -qq -y install ${training.packages_trusty.apt} + args: + tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/taskcluster/tc-train-extra-tests.sh 3.6.10:m 16k" + metadata: + name: "DeepSpeech Linux AMD64 CPU 8kHz all training features Py3.7" + description: "Training (all features) a DeepSpeech LDC93S1 model for Linux/AMD64 8kHz Python 3.7, CPU only, optimized version" diff --git a/taskcluster/test-training-extra_16k-linux-amd64-py37m-opt.yml b/taskcluster/test-training-extra_16k-linux-amd64-py37m-opt.yml new file mode 100644 index 00000000..a41f7cd4 --- /dev/null +++ b/taskcluster/test-training-extra_16k-linux-amd64-py37m-opt.yml @@ -0,0 +1,12 @@ +build: + template_file: test-linux-opt-base.tyml + dependencies: + - "linux-amd64-ctc-opt" + system_setup: + > + apt-get -qq update && apt-get -qq -y install ${training.packages_trusty.apt} + args: + tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/taskcluster/tc-train-extra-tests.sh 3.7.6:m 16k" + metadata: + name: "DeepSpeech Linux AMD64 CPU 8kHz all training features Py3.7" + description: "Training (all features) a DeepSpeech LDC93S1 model for Linux/AMD64 8kHz Python 3.7, CPU only, optimized version" diff --git a/taskcluster/test-training-extra_8k-linux-amd64-py36m-opt.yml b/taskcluster/test-training-extra_8k-linux-amd64-py36m-opt.yml new file mode 100644 index 00000000..b79209ae --- /dev/null +++ b/taskcluster/test-training-extra_8k-linux-amd64-py36m-opt.yml @@ -0,0 +1,12 @@ +build: + template_file: test-linux-opt-base.tyml + dependencies: + - "linux-amd64-ctc-opt" + system_setup: + > + apt-get -qq update && apt-get -qq -y install ${training.packages_trusty.apt} + args: + tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/taskcluster/tc-train-extra-tests.sh 3.6.10:m 8k" + metadata: + name: "DeepSpeech Linux AMD64 CPU 8kHz all training features Py3.7" + description: "Training (all features) a DeepSpeech LDC93S1 model for Linux/AMD64 8kHz Python 3.7, CPU only, optimized version" diff --git a/taskcluster/test-training-extra_8k-linux-amd64-py37m-opt.yml b/taskcluster/test-training-extra_8k-linux-amd64-py37m-opt.yml new file mode 100644 index 00000000..ed5259bb --- /dev/null +++ b/taskcluster/test-training-extra_8k-linux-amd64-py37m-opt.yml @@ -0,0 +1,12 @@ +build: + template_file: test-linux-opt-base.tyml + dependencies: + - "linux-amd64-ctc-opt" + system_setup: + > + apt-get -qq update && apt-get -qq -y install ${training.packages_trusty.apt} + args: + tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/taskcluster/tc-train-extra-tests.sh 3.7.6:m 8k" + metadata: + name: "DeepSpeech Linux AMD64 CPU 8kHz all training features Py3.7" + description: "Training (all features) a DeepSpeech LDC93S1 model for Linux/AMD64 8kHz Python 3.7, CPU only, optimized version" diff --git a/taskcluster/test-training_16k-linux-amd64-py35m-opt.yml b/taskcluster/test-training_16k-linux-amd64-py35m-opt.yml index 3f68fea3..48c25019 100644 --- a/taskcluster/test-training_16k-linux-amd64-py35m-opt.yml +++ b/taskcluster/test-training_16k-linux-amd64-py35m-opt.yml @@ -8,5 +8,5 @@ build: args: tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/taskcluster/tc-train-tests.sh 3.5.8:m 16k" metadata: - name: "DeepSpeech Linux AMD64 CPU 16kHz training Py3.5" + name: "DeepSpeech Linux AMD64 CPU 16kHz basic training Py3.5" description: "Training a DeepSpeech LDC93S1 model for Linux/AMD64 16kHz Python 3.5, CPU only, optimized version" diff --git a/taskcluster/test-training_16k-linux-amd64-py36m-opt.yml b/taskcluster/test-training_16k-linux-amd64-py36m-opt.yml index 9fa9791b..1d4eaa98 100644 --- a/taskcluster/test-training_16k-linux-amd64-py36m-opt.yml +++ b/taskcluster/test-training_16k-linux-amd64-py36m-opt.yml @@ -8,5 +8,5 @@ build: args: tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/taskcluster/tc-train-tests.sh 3.6.10:m 16k" metadata: - name: "DeepSpeech Linux AMD64 CPU 16kHz training Py3.6" + name: "DeepSpeech Linux AMD64 CPU 16kHz basic training Py3.6" description: "Training a DeepSpeech LDC93S1 model for Linux/AMD64 16kHz Python 3.6, CPU only, optimized version" diff --git a/taskcluster/test-training_16k-linux-amd64-py37m-opt.yml b/taskcluster/test-training_16k-linux-amd64-py37m-opt.yml index a63631db..25a35efa 100644 --- a/taskcluster/test-training_16k-linux-amd64-py37m-opt.yml +++ b/taskcluster/test-training_16k-linux-amd64-py37m-opt.yml @@ -8,5 +8,5 @@ build: args: tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/taskcluster/tc-train-tests.sh 3.7.6:m 16k" metadata: - name: "DeepSpeech Linux AMD64 CPU 16kHz training Py3.7" + name: "DeepSpeech Linux AMD64 CPU 16kHz basic training Py3.7" description: "Training a DeepSpeech LDC93S1 model for Linux/AMD64 16kHz Python 3.7, CPU only, optimized version" diff --git a/taskcluster/test-training_8k-linux-amd64-py36m-opt.yml b/taskcluster/test-training_8k-linux-amd64-py36m-opt.yml index dc2b486f..b9396fdd 100644 --- a/taskcluster/test-training_8k-linux-amd64-py36m-opt.yml +++ b/taskcluster/test-training_8k-linux-amd64-py36m-opt.yml @@ -8,5 +8,5 @@ build: args: tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/taskcluster/tc-train-tests.sh 3.6.10:m 8k" metadata: - name: "DeepSpeech Linux AMD64 CPU 8kHz training Py3.6" + name: "DeepSpeech Linux AMD64 CPU 8kHz basic training Py3.6" description: "Training a DeepSpeech LDC93S1 model for Linux/AMD64 8kHz Python 3.6, CPU only, optimized version" diff --git a/taskcluster/test-training_8k-linux-amd64-py37m-opt.yml b/taskcluster/test-training_8k-linux-amd64-py37m-opt.yml index c863fa11..eb7cb1be 100644 --- a/taskcluster/test-training_8k-linux-amd64-py37m-opt.yml +++ b/taskcluster/test-training_8k-linux-amd64-py37m-opt.yml @@ -8,5 +8,5 @@ build: args: tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/taskcluster/tc-train-tests.sh 3.7.6:m 8k" metadata: - name: "DeepSpeech Linux AMD64 CPU 8kHz training Py3.7" + name: "DeepSpeech Linux AMD64 CPU 8kHz basic training Py3.7" description: "Training a DeepSpeech LDC93S1 model for Linux/AMD64 8kHz Python 3.7, CPU only, optimized version"