[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use accurate available CPU count STT-wide #2253

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Reimpl özden batch lm gen
  • Loading branch information
wasertech committed Jul 4, 2022
commit 22c8cd5c13451079a0dabb94eb38e1485c12c581
3 changes: 3 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -823,6 +823,9 @@ jobs:
# Test FLAC input
time ./bin/run-ci-ldc93s1-flac.sh --epochs 1

# Test LM gen
time ./bin/run-ci-lm-gen-batch.sh

# Test LM opt
time ./bin/run-ci-lm-opt.sh
training-sdb-tests:
Expand Down
2 changes: 2 additions & 0 deletions Dockerfile.train
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ RUN apt-get update && \
libvorbisfile3 \
libopusfile0 \
libsndfile1 \
libboost-program-options-dev \
libboost-thread-dev \
sox \
libsox-fmt-mp3 \
python3-venv \
Expand Down
31 changes: 31 additions & 0 deletions bin/run-ci-lm-gen-batch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/sh

# This test optimizes the scorer for testing purposes

set -xe

if [ ! -f lm_optimizer.py ]; then
echo "Please make sure you run this from STT's top level directory."
exit 1
fi;



lm_path="./data/lm"
sources_lm_filepath="./data/smoke_test/vocab.txt"

# Force only one visible device because we have a single-sample dataset
# and when trying to run on multiple devices (like GPUs), this will break

python data/lm/generate_lm_batch.py \
--input_txt "${sources_lm_filepath}" \
--output_dir "${lm_path}" \
--top_k_list 30000 \
--arpa_order_list "4" \
--max_arpa_memory "85%" \
--arpa_prune_list "0|0|2" \
--binary_a_bits 255 \
--binary_q_bits 8 \
--binary_type trie \
--kenlm_bins /code/kenlm/build/bin/ \
-j 1
Empty file modified data/lm/generate_lm.py
100644 → 100755
Empty file.
Loading