Skip to content

Commit

Permalink
Making the training thread count explicit
Browse files Browse the repository at this point in the history
  • Loading branch information
mtlynch committed May 1, 2018
1 parent 235cb91 commit 3f02dbf
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
7 changes: 6 additions & 1 deletion test_e2e
Expand Up @@ -18,6 +18,9 @@ CRF_TRAINING_FILE="${OUTPUT_DIR}/training_data.crf"
CRF_TESTING_FILE="${OUTPUT_DIR}/testing_data.crf"

CRF_LEARN_TEMPLATE=template_file
# This needs to be explicit so that there is consistent training between
# different machines.
CRF_TRAINING_THREADS=2
CRF_MODEL_FILE="${OUTPUT_DIR}/crf_model"

TESTING_OUTPUT_FILE="${OUTPUT_DIR}/testing_output"
Expand All @@ -42,7 +45,9 @@ bin/generate_data \

diff --context=2 "$GOLDEN_CRF_TESTING_FILE" "$CRF_TESTING_FILE"

crf_learn "$CRF_LEARN_TEMPLATE" "$CRF_TESTING_FILE" "$CRF_MODEL_FILE"
crf_learn \
--thread="$CRF_TRAINING_THREADS" \
"$CRF_LEARN_TEMPLATE" "$CRF_TESTING_FILE" "$CRF_MODEL_FILE"

crf_test \
--model="$CRF_MODEL_FILE" \
Expand Down
8 changes: 4 additions & 4 deletions tests/golden/eval_output
@@ -1,10 +1,10 @@

Sentence-Level Stats:
correct: 1852
correct: 1858
total: 1999
% correct: 92.6463231616
% correct: 92.9464732366

Word-Level Stats:
correct: 11240
correct: 11249
total: 11450
% correct: 98.1659388646
% correct: 98.2445414847

0 comments on commit 3f02dbf

Please sign in to comment.