commit
b327fa3c73
@ -20,11 +20,3 @@ jobs:
|
||||
fi
|
||||
cardboardlinter --refspec $TRAVIS_BRANCH -n auto;
|
||||
fi
|
||||
- name: python unit tests
|
||||
install:
|
||||
- pip install --upgrade -r requirements_tests.txt;
|
||||
pip install --upgrade .
|
||||
script:
|
||||
- if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
|
||||
python -m unittest;
|
||||
fi
|
||||
|
||||
19
taskcluster/tc-train-unittests.sh
Normal file
19
taskcluster/tc-train-unittests.sh
Normal file
@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -xe
|
||||
|
||||
source $(dirname "$0")/tc-tests-utils.sh
|
||||
|
||||
extract_python_versions "$1" "pyver" "pyver_pkg" "py_unicode_type" "pyconf" "pyalias"
|
||||
|
||||
mkdir -p ${TASKCLUSTER_ARTIFACTS} || 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
|
||||
python -m unittest
|
||||
popd
|
||||
set +o pipefail
|
||||
@ -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-unittests.sh 3.5.8:m"
|
||||
metadata:
|
||||
name: "DeepSpeech on Linux AMD64 CPU training unittests using Python 3.5"
|
||||
description: "Training unittests DeepSpeech LDC93S1 model for Linux/AMD64 using Python 3.5, for CPU only, and optimized version"
|
||||
@ -0,0 +1,13 @@
|
||||
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-unittests.sh 3.6.10:m"
|
||||
metadata:
|
||||
name: "DeepSpeech on Linux AMD64 CPU training unittests using Python 3.6"
|
||||
description: "Training unittests DeepSpeech LDC93S1 model for Linux/AMD64 using Python 3.6, for CPU only, and optimized version"
|
||||
|
||||
@ -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-unittests.sh 3.7.6:m"
|
||||
metadata:
|
||||
name: "DeepSpeech on Linux AMD64 CPU training unittests using Python 3.7"
|
||||
description: "Training unittests DeepSpeech LDC93S1 model for Linux/AMD64 using Python 3.7, for CPU only, and optimized version"
|
||||
@ -42,15 +42,17 @@ def get_validate_label(args):
|
||||
:return: The user-supplied validate_label function
|
||||
:type: function
|
||||
"""
|
||||
# Python 3.5 does not support passing a pathlib.Path to os.path.* methods
|
||||
if 'validate_label_locale' not in args or (args.validate_label_locale is None):
|
||||
print('WARNING: No --validate_label_locale specified, your might end with inconsistent dataset.')
|
||||
return validate_label_eng
|
||||
if not os.path.exists(os.path.abspath(args.validate_label_locale)):
|
||||
validate_label_locale = str(args.validate_label_locale)
|
||||
if not os.path.exists(os.path.abspath(validate_label_locale)):
|
||||
print('ERROR: Inexistent --validate_label_locale specified. Please check.')
|
||||
return None
|
||||
module_dir = os.path.abspath(os.path.dirname(args.validate_label_locale))
|
||||
module_dir = os.path.abspath(os.path.dirname(validate_label_locale))
|
||||
sys.path.insert(1, module_dir)
|
||||
fname = os.path.basename(args.validate_label_locale).replace('.py', '')
|
||||
fname = os.path.basename(validate_label_locale).replace('.py', '')
|
||||
locale_module = importlib.import_module(fname, package=None)
|
||||
return locale_module.validate_label
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user