From 6c4d4f1e68a2a9d9f3119bd0402d6f9a151fc87f Mon Sep 17 00:00:00 2001 From: Alexandre Lissy Date: Thu, 15 Mar 2018 13:53:17 +0100 Subject: [PATCH] Expose versions numbers on stderr Fixes #1292 --- native_client/BUILD | 9 ++++++++- native_client/client.cc | 1 + native_client/deepspeech.cc | 12 ++++++++++++ native_client/deepspeech.h | 2 ++ native_client/ds_git_version.sh | 18 ++++++++++++++++++ taskcluster/darwin-amd64-cpu-aot_prod-opt.yml | 4 ++-- taskcluster/darwin-amd64-cpu-opt.yml | 4 ++-- taskcluster/linux-amd64-cpu-aot_prod-opt.yml | 4 ++-- taskcluster/linux-amd64-cpu-aot_test-opt.yml | 4 ++-- taskcluster/linux-amd64-cpu-opt.yml | 4 ++-- taskcluster/linux-amd64-ctc-opt.yml | 4 ++-- taskcluster/linux-amd64-gpu-opt.yml | 4 ++-- taskcluster/linux-rpi3-cpu-aot_prod-opt.yml | 4 ++-- taskcluster/linux-rpi3-cpu-opt.yml | 4 ++-- taskcluster/node-package.yml | 4 ++-- taskcluster/test-darwin-opt-base.tyml | 1 + taskcluster/test-linux-opt-base.tyml | 1 + ...raining_upstream-linux-amd64-py27mu-opt.yml | 2 +- tc-cpp-ds-tests-prod.sh | 2 ++ tc-cpp-ds-tests.sh | 2 ++ tc-tests-utils.sh | 14 ++++++++++++++ 21 files changed, 82 insertions(+), 22 deletions(-) create mode 100755 native_client/ds_git_version.sh diff --git a/native_client/BUILD b/native_client/BUILD index 5d001c96..d1a25a95 100644 --- a/native_client/BUILD +++ b/native_client/BUILD @@ -45,9 +45,16 @@ genrule( cmd = "cp $(DS_MODEL_FILE) $@" ) +genrule( + name = "ds_git_version", + outs = ["ds_version.h"], + cmd = "$(location :ds_git_version.sh) >$@", + tools = [":ds_git_version.sh"] +) + tf_cc_shared_object( name = "libdeepspeech.so", - srcs = ["deepspeech.cc", "deepspeech.h", "deepspeech_utils.h", "alphabet.h", "beam_search.h", "trie_node.h"] + + srcs = ["deepspeech.cc", "deepspeech.h", "deepspeech_utils.h", "alphabet.h", "beam_search.h", "trie_node.h", "ds_version.h"] + if_native_model(["deepspeech_model_core.h"]) + glob(["kenlm/lm/*.cc", "kenlm/util/*.cc", "kenlm/util/double-conversion/*.cc", "kenlm/lm/*.hh", "kenlm/util/*.hh", "kenlm/util/double-conversion/*.h"], diff --git a/native_client/client.cc b/native_client/client.cc index e2a81608..9be40769 100644 --- a/native_client/client.cc +++ b/native_client/client.cc @@ -228,6 +228,7 @@ main(int argc, char **argv) printf(" AUDIO_PATH\tPath to the audio file (or directory of files) to run" " (any file format supported by libsox). \n"); printf(" -t\t\tRun in benchmark mode, output mfcc & inference time\n"); + print_versions(); return 1; } diff --git a/native_client/deepspeech.cc b/native_client/deepspeech.cc index 3450572d..dc1da9da 100644 --- a/native_client/deepspeech.cc +++ b/native_client/deepspeech.cc @@ -14,6 +14,9 @@ #include "alphabet.h" #include "beam_search.h" +#include "tensorflow/core/public/version.h" +#include "native_client/ds_version.h" + #include "tensorflow/core/public/session.h" #include "tensorflow/core/platform/env.h" #include "tensorflow/core/util/memmapped_file_system.h" @@ -53,6 +56,8 @@ Model::Model(const char* aModelPath, int aNCep, int aNContext, mPriv->beam_width = aBeamWidth; mPriv->run_aot = false; + print_versions(); + if (!aModelPath || strlen(aModelPath) < 1) { std::cerr << "No model specified, will rely on built-in model." << std::endl; mPriv->run_aot = true; @@ -352,4 +357,11 @@ Model::stt(const short* aBuffer, unsigned int aBufferSize, int aSampleRate) return string; } +DEEPSPEECH_EXPORT +void +print_versions() { + std::cerr << "TensorFlow: " << tf_git_version() << std::endl; + std::cerr << "DeepSpeech: " << ds_git_version() << std::endl; +} + } diff --git a/native_client/deepspeech.h b/native_client/deepspeech.h index ade5f17f..149babaa 100644 --- a/native_client/deepspeech.h +++ b/native_client/deepspeech.h @@ -10,6 +10,8 @@ namespace DeepSpeech class Private; + void print_versions(); + class Model { private: Private* mPriv; diff --git a/native_client/ds_git_version.sh b/native_client/ds_git_version.sh new file mode 100755 index 00000000..aad2df83 --- /dev/null +++ b/native_client/ds_git_version.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +GIT_DIR="$(realpath "$(dirname "$(realpath "$0")")/../.git/")" +if [ ! -d "${GIT_DIR}" ]; then + return 1 +fi; + +GIT_VERSION=$(git --git-dir="${GIT_DIR}" describe --long --tags) +if [ $? -ne 0 ]; then + GIT_VERSION=unknown; +fi + +cat < +const char* ds_git_version() { + return "${GIT_VERSION}"; +} +EOF diff --git a/taskcluster/darwin-amd64-cpu-aot_prod-opt.yml b/taskcluster/darwin-amd64-cpu-aot_prod-opt.yml index 9f0e0652..ae07a7bc 100644 --- a/taskcluster/darwin-amd64-cpu-aot_prod-opt.yml +++ b/taskcluster/darwin-amd64-cpu-aot_prod-opt.yml @@ -4,8 +4,8 @@ build: - "index.project.deepspeech.deepspeech.native_client.${event.head.branch}.osx_aot" - "index.project.deepspeech.deepspeech.native_client.${event.head.branch}.${event.head.sha}.osx_aot" - "index.project.deepspeech.deepspeech.native_client.osx_aot.${event.head.sha}" - tensorflow: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.6.1bd035dd4853a1f95396cb087343a952b6b61272.osx/artifacts/public/home.tar.xz" - summarize_graph: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.6.1bd035dd4853a1f95396cb087343a952b6b61272.osx/artifacts/public/summarize_graph" + tensorflow: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.6.236f83eb5d4d73a33938154f4b1e631355f6a1f0.osx/artifacts/public/home.tar.xz" + summarize_graph: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.6.236f83eb5d4d73a33938154f4b1e631355f6a1f0.osx/artifacts/public/summarize_graph" scripts: build: "taskcluster/host-build.sh --aot" package: "taskcluster/package.sh" diff --git a/taskcluster/darwin-amd64-cpu-opt.yml b/taskcluster/darwin-amd64-cpu-opt.yml index 74e6ccbf..85f1738d 100644 --- a/taskcluster/darwin-amd64-cpu-opt.yml +++ b/taskcluster/darwin-amd64-cpu-opt.yml @@ -6,8 +6,8 @@ build: - "index.project.deepspeech.deepspeech.native_client.osx.${event.head.sha}" - "notify.irc-channel.${notifications.irc}.on-exception" - "notify.irc-channel.${notifications.irc}.on-failed" - tensorflow: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.6.1bd035dd4853a1f95396cb087343a952b6b61272.osx/artifacts/public/home.tar.xz" - summarize_graph: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.6.1bd035dd4853a1f95396cb087343a952b6b61272.osx/artifacts/public/summarize_graph" + tensorflow: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.6.236f83eb5d4d73a33938154f4b1e631355f6a1f0.osx/artifacts/public/home.tar.xz" + summarize_graph: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.6.236f83eb5d4d73a33938154f4b1e631355f6a1f0.osx/artifacts/public/summarize_graph" scripts: build: "taskcluster/host-build.sh" package: "taskcluster/package.sh" diff --git a/taskcluster/linux-amd64-cpu-aot_prod-opt.yml b/taskcluster/linux-amd64-cpu-aot_prod-opt.yml index d4485ae5..ccd356e2 100644 --- a/taskcluster/linux-amd64-cpu-aot_prod-opt.yml +++ b/taskcluster/linux-amd64-cpu-aot_prod-opt.yml @@ -4,8 +4,8 @@ build: - "index.project.deepspeech.deepspeech.native_client.${event.head.branch}.cpu_aot" - "index.project.deepspeech.deepspeech.native_client.${event.head.branch}.${event.head.sha}.cpu_aot" - "index.project.deepspeech.deepspeech.native_client.cpu_aot.${event.head.sha}" - tensorflow: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.6.1bd035dd4853a1f95396cb087343a952b6b61272.cpu/artifacts/public/home.tar.xz" - summarize_graph: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.6.1bd035dd4853a1f95396cb087343a952b6b61272.cpu/artifacts/public/summarize_graph" + tensorflow: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.6.236f83eb5d4d73a33938154f4b1e631355f6a1f0.cpu/artifacts/public/home.tar.xz" + summarize_graph: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.6.236f83eb5d4d73a33938154f4b1e631355f6a1f0.cpu/artifacts/public/summarize_graph" system_setup: > ${nodejs.packages.prep_6} && apt-get -qq update && apt-get -qq -y install nodejs python-yaml && diff --git a/taskcluster/linux-amd64-cpu-aot_test-opt.yml b/taskcluster/linux-amd64-cpu-aot_test-opt.yml index 443094d2..62475edb 100644 --- a/taskcluster/linux-amd64-cpu-aot_test-opt.yml +++ b/taskcluster/linux-amd64-cpu-aot_test-opt.yml @@ -6,8 +6,8 @@ build: template_file: linux-opt-base.tyml dependencies: - "test-training_upstream-linux-amd64-py27mu-opt" - tensorflow: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.6.1bd035dd4853a1f95396cb087343a952b6b61272.cpu/artifacts/public/home.tar.xz" - summarize_graph: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.6.1bd035dd4853a1f95396cb087343a952b6b61272.cpu/artifacts/public/summarize_graph" + tensorflow: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.6.236f83eb5d4d73a33938154f4b1e631355f6a1f0.cpu/artifacts/public/home.tar.xz" + summarize_graph: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.6.236f83eb5d4d73a33938154f4b1e631355f6a1f0.cpu/artifacts/public/summarize_graph" system_setup: > ${nodejs.packages.prep_6} && apt-get -qq update && apt-get -qq -y install nodejs python-yaml && diff --git a/taskcluster/linux-amd64-cpu-opt.yml b/taskcluster/linux-amd64-cpu-opt.yml index cdaeb924..555098cb 100644 --- a/taskcluster/linux-amd64-cpu-opt.yml +++ b/taskcluster/linux-amd64-cpu-opt.yml @@ -13,8 +13,8 @@ build: system_config: > ${swig.patch_nodejs.linux} - tensorflow: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.6.1bd035dd4853a1f95396cb087343a952b6b61272.cpu/artifacts/public/home.tar.xz" - summarize_graph: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.6.1bd035dd4853a1f95396cb087343a952b6b61272.cpu/artifacts/public/summarize_graph" + tensorflow: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.6.236f83eb5d4d73a33938154f4b1e631355f6a1f0.cpu/artifacts/public/home.tar.xz" + summarize_graph: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.6.236f83eb5d4d73a33938154f4b1e631355f6a1f0.cpu/artifacts/public/summarize_graph" scripts: build: "taskcluster/host-build.sh" package: "taskcluster/package.sh" diff --git a/taskcluster/linux-amd64-ctc-opt.yml b/taskcluster/linux-amd64-ctc-opt.yml index a5863345..c1e141d0 100644 --- a/taskcluster/linux-amd64-ctc-opt.yml +++ b/taskcluster/linux-amd64-ctc-opt.yml @@ -4,8 +4,8 @@ build: - "pull_request.synchronize" - "pull_request.reopened" template_file: linux-opt-base.tyml - tensorflow: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.6.1bd035dd4853a1f95396cb087343a952b6b61272.cpu/artifacts/public/home.tar.xz" - summarize_graph: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.6.1bd035dd4853a1f95396cb087343a952b6b61272.cpu/artifacts/public/summarize_graph" + tensorflow: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.6.236f83eb5d4d73a33938154f4b1e631355f6a1f0.cpu/artifacts/public/home.tar.xz" + summarize_graph: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.6.236f83eb5d4d73a33938154f4b1e631355f6a1f0.cpu/artifacts/public/summarize_graph" scripts: build: 'taskcluster/decoder-build.sh' package: 'taskcluster/decoder-package.sh' diff --git a/taskcluster/linux-amd64-gpu-opt.yml b/taskcluster/linux-amd64-gpu-opt.yml index 6c65c03e..45a10b91 100644 --- a/taskcluster/linux-amd64-gpu-opt.yml +++ b/taskcluster/linux-amd64-gpu-opt.yml @@ -11,8 +11,8 @@ build: system_config: > ${swig.patch_nodejs.linux} - tensorflow: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.6.1bd035dd4853a1f95396cb087343a952b6b61272.gpu/artifacts/public/home.tar.xz" - summarize_graph: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.6.1bd035dd4853a1f95396cb087343a952b6b61272.gpu/artifacts/public/summarize_graph" + tensorflow: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.6.236f83eb5d4d73a33938154f4b1e631355f6a1f0.gpu/artifacts/public/home.tar.xz" + summarize_graph: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.6.236f83eb5d4d73a33938154f4b1e631355f6a1f0.gpu/artifacts/public/summarize_graph" maxRunTime: 14400 scripts: build: "taskcluster/cuda-build.sh" diff --git a/taskcluster/linux-rpi3-cpu-aot_prod-opt.yml b/taskcluster/linux-rpi3-cpu-aot_prod-opt.yml index 23271079..bfb5b181 100644 --- a/taskcluster/linux-rpi3-cpu-aot_prod-opt.yml +++ b/taskcluster/linux-rpi3-cpu-aot_prod-opt.yml @@ -4,8 +4,8 @@ build: - "index.project.deepspeech.deepspeech.native_client.${event.head.branch}.arm_aot" - "index.project.deepspeech.deepspeech.native_client.${event.head.branch}.${event.head.sha}.arm_aot" - "index.project.deepspeech.deepspeech.native_client.arm_aot.${event.head.sha}" - tensorflow: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.6.1bd035dd4853a1f95396cb087343a952b6b61272.arm/artifacts/public/home.tar.xz" - summarize_graph: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.6.1bd035dd4853a1f95396cb087343a952b6b61272.cpu/artifacts/public/summarize_graph" + tensorflow: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.6.236f83eb5d4d73a33938154f4b1e631355f6a1f0.arm/artifacts/public/home.tar.xz" + summarize_graph: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.6.236f83eb5d4d73a33938154f4b1e631355f6a1f0.cpu/artifacts/public/summarize_graph" ## multistrap 2.2.0-ubuntu1 is broken in 14.04: https://bugs.launchpad.net/ubuntu/+source/multistrap/+bug/1313787 system_setup: > diff --git a/taskcluster/linux-rpi3-cpu-opt.yml b/taskcluster/linux-rpi3-cpu-opt.yml index bd4aa1f9..9fd2aa4d 100644 --- a/taskcluster/linux-rpi3-cpu-opt.yml +++ b/taskcluster/linux-rpi3-cpu-opt.yml @@ -4,8 +4,8 @@ build: - "index.project.deepspeech.deepspeech.native_client.${event.head.branch}.arm" - "index.project.deepspeech.deepspeech.native_client.${event.head.branch}.${event.head.sha}.arm" - "index.project.deepspeech.deepspeech.native_client.arm.${event.head.sha}" - tensorflow: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.6.1bd035dd4853a1f95396cb087343a952b6b61272.arm/artifacts/public/home.tar.xz" - summarize_graph: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.6.1bd035dd4853a1f95396cb087343a952b6b61272.cpu/artifacts/public/summarize_graph" + tensorflow: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.6.236f83eb5d4d73a33938154f4b1e631355f6a1f0.arm/artifacts/public/home.tar.xz" + summarize_graph: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.6.236f83eb5d4d73a33938154f4b1e631355f6a1f0.cpu/artifacts/public/summarize_graph" ## multistrap 2.2.0-ubuntu1 is broken in 14.04: https://bugs.launchpad.net/ubuntu/+source/multistrap/+bug/1313787 system_setup: > diff --git a/taskcluster/node-package.yml b/taskcluster/node-package.yml index 38bbe06b..4034fffc 100644 --- a/taskcluster/node-package.yml +++ b/taskcluster/node-package.yml @@ -14,8 +14,8 @@ build: system_config: > ${swig.patch_nodejs.linux} - tensorflow: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.6.1bd035dd4853a1f95396cb087343a952b6b61272.cpu/artifacts/public/home.tar.xz" - summarize_graph: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.6.1bd035dd4853a1f95396cb087343a952b6b61272.cpu/artifacts/public/summarize_graph" + tensorflow: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.6.236f83eb5d4d73a33938154f4b1e631355f6a1f0.cpu/artifacts/public/home.tar.xz" + summarize_graph: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.6.236f83eb5d4d73a33938154f4b1e631355f6a1f0.cpu/artifacts/public/summarize_graph" scripts: build: "taskcluster/node-build.sh" package: "taskcluster/node-package.sh" diff --git a/taskcluster/test-darwin-opt-base.tyml b/taskcluster/test-darwin-opt-base.tyml index ae904a05..e5df94b7 100644 --- a/taskcluster/test-darwin-opt-base.tyml +++ b/taskcluster/test-darwin-opt-base.tyml @@ -39,6 +39,7 @@ then: DEEPSPEECH_TEST_MODEL: https://queue.taskcluster.net/v1/task/${training}/artifacts/public/output_graph.pb DEEPSPEECH_PROD_MODEL: https://s3-us-west-2.amazonaws.com/deepspeech/mmap/output_graph.pb DEEPSPEECH_PROD_MODEL_MMAP: https://s3-us-west-2.amazonaws.com/deepspeech/mmap/output_graph.pbmm + EXPECTED_TENSORFLOW_VERSION: "TensorFlow: v1.6.0-9-g236f83e" command: - - "/bin/bash" diff --git a/taskcluster/test-linux-opt-base.tyml b/taskcluster/test-linux-opt-base.tyml index 18ffdd1e..51c28597 100644 --- a/taskcluster/test-linux-opt-base.tyml +++ b/taskcluster/test-linux-opt-base.tyml @@ -47,6 +47,7 @@ then: DEEPSPEECH_PROD_MODEL: https://s3.amazonaws.com/deep-speech/mmap/output_graph.pb DEEPSPEECH_PROD_MODEL_MMAP: https://s3.amazonaws.com/deep-speech/mmap/output_graph.pbmm PIP_DEFAULT_TIMEOUT: 60 + EXPECTED_TENSORFLOW_VERSION: "TensorFlow: v1.6.0-9-g236f83e" command: - "/bin/bash" diff --git a/taskcluster/test-training_upstream-linux-amd64-py27mu-opt.yml b/taskcluster/test-training_upstream-linux-amd64-py27mu-opt.yml index 86d6e36c..df6c96cb 100644 --- a/taskcluster/test-training_upstream-linux-amd64-py27mu-opt.yml +++ b/taskcluster/test-training_upstream-linux-amd64-py27mu-opt.yml @@ -7,7 +7,7 @@ build: apt-get -qq -y install ${python.packages.apt} args: tests_cmdline: "${system.homedir.linux}/DeepSpeech/ds/tc-train-tests.sh 2.7.14:mu upstream" - convert_graphdef: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.6.1bd035dd4853a1f95396cb087343a952b6b61272.cpu/artifacts/public/convert_graphdef_memmapped_format" + convert_graphdef: "https://index.taskcluster.net/v1/task/project.deepspeech.tensorflow.pip.r1.6.236f83eb5d4d73a33938154f4b1e631355f6a1f0.cpu/artifacts/public/convert_graphdef_memmapped_format" metadata: name: "DeepSpeech Linux AMD64 CPU upstream training Py2.7 mu" description: "Training a DeepSpeech LDC93S1 model for Linux/AMD64 using upstream TensorFlow Python 2.7 mu, CPU only, optimized version" diff --git a/tc-cpp-ds-tests-prod.sh b/tc-cpp-ds-tests-prod.sh index a7450cdf..40384849 100644 --- a/tc-cpp-ds-tests-prod.sh +++ b/tc-cpp-ds-tests-prod.sh @@ -14,4 +14,6 @@ download_material "${TASKCLUSTER_TMP_DIR}/ds" export PATH=${TASKCLUSTER_TMP_DIR}/ds/:$PATH +check_tensorflow_version + run_prod_inference_tests diff --git a/tc-cpp-ds-tests.sh b/tc-cpp-ds-tests.sh index 642429cd..b093cb25 100644 --- a/tc-cpp-ds-tests.sh +++ b/tc-cpp-ds-tests.sh @@ -10,6 +10,8 @@ download_material "${TASKCLUSTER_TMP_DIR}/ds" "${aot_model}" export PATH=${TASKCLUSTER_TMP_DIR}/ds/:$PATH +check_tensorflow_version + run_all_inference_tests run_multi_inference_tests diff --git a/tc-tests-utils.sh b/tc-tests-utils.sh index 2b01c84e..e3b9d4c5 100755 --- a/tc-tests-utils.sh +++ b/tc-tests-utils.sh @@ -200,6 +200,20 @@ assert_correct_warning_upsampling() assert_shows_something "$1" "is lower than 16kHz. Up-sampling might produce erratic speech recognition" } +assert_tensorflow_version() +{ + assert_shows_something "$1" "${EXPECTED_TENSORFLOW_VERSION}" +} + +check_tensorflow_version() +{ + set +e + ds_help=$(deepspeech 2>&1 1>/dev/null) + set -e + + assert_tensorflow_version "${ds_help}" +} + run_all_inference_tests() { phrase_pbmodel_nolm=$(deepspeech ${TASKCLUSTER_TMP_DIR}/${model_name} ${TASKCLUSTER_TMP_DIR}/alphabet.txt ${TASKCLUSTER_TMP_DIR}/LDC93S1.wav)