Add CI tests for notebooks
This commit is contained in:
parent
8a3cea8b6d
commit
6405bd1758
|
@ -0,0 +1,14 @@
|
|||
#!/bin/bash
|
||||
set -xe
|
||||
|
||||
source $(dirname "$0")/all-vars.sh
|
||||
source $(dirname "$0")/all-utils.sh
|
||||
|
||||
set -o pipefail
|
||||
pip install --upgrade pip setuptools wheel | cat
|
||||
pip install --upgrade . | cat
|
||||
set +o pipefail
|
||||
|
||||
for python_notebook in ./notebooks/*.ipynb; do
|
||||
time jupyter nbconvert --to notebook --execute $python_notebook
|
||||
done
|
|
@ -99,11 +99,11 @@
|
|||
"from coqui_stt_training.util.downloader import maybe_download\n",
|
||||
"\n",
|
||||
"def download_preformatted_data():\n",
|
||||
" if not os.path.exists(\"sr-data\"):\n",
|
||||
" maybe_download(\"sr-data.tar\", \".\", \"https://coqui-ai-public-data.s3.amazonaws.com/cv/7.0/sr-data.tar\")\n",
|
||||
" if not os.path.exists(\"serbian/sr-data\"):\n",
|
||||
" maybe_download(\"sr-data.tar\", \"serbian/\", \"https://coqui-ai-public-data.s3.amazonaws.com/cv/7.0/sr-data.tar\")\n",
|
||||
" print('\\nExtracting data...')\n",
|
||||
" tar = tarfile.open(\"sr-data.tar\", mode=\"r:\")\n",
|
||||
" tar.extractall(\".\")\n",
|
||||
" tar = tarfile.open(\"serbian/sr-data.tar\", mode=\"r:\")\n",
|
||||
" tar.extractall(\"serbian/\")\n",
|
||||
" tar.close()\n",
|
||||
" print('\\nFinished extracting data...')\n",
|
||||
" else:\n",
|
||||
|
@ -129,8 +129,8 @@
|
|||
"id": "fa2aec77"
|
||||
},
|
||||
"source": [
|
||||
"! ls sr-data\n",
|
||||
"! wc -l sr-data/*.csv"
|
||||
"! ls serbian/sr-data\n",
|
||||
"! wc -l serbian/sr-data/*.csv"
|
||||
],
|
||||
"id": "fa2aec77",
|
||||
"execution_count": null,
|
||||
|
@ -161,9 +161,10 @@
|
|||
"from coqui_stt_training.util.config import initialize_globals_from_args\n",
|
||||
"\n",
|
||||
"initialize_globals_from_args(\n",
|
||||
" train_files=[\"sr-data/train.csv\"],\n",
|
||||
" dev_files=[\"sr-data/dev.csv\"],\n",
|
||||
" test_files=[\"sr-data/test.csv\"],\n",
|
||||
" train_files=[\"serbian/sr-data/train.csv\"],\n",
|
||||
" dev_files=[\"serbian/sr-data/dev.csv\"],\n",
|
||||
" test_files=[\"serbian/sr-data/test.csv\"],\n",
|
||||
" checkpoint_dir=\"serbian/checkpoints/\",\n",
|
||||
" load_train=\"init\",\n",
|
||||
" n_hidden=200,\n",
|
||||
" epochs=1,\n",
|
||||
|
|
Loading…
Reference in New Issue