diff options
author | Roman Grundkiewicz <rgrundki@exseed.ed.ac.uk> | 2018-09-18 23:07:39 +0300 |
---|---|---|
committer | Roman Grundkiewicz <rgrundki@exseed.ed.ac.uk> | 2018-09-19 11:28:16 +0300 |
commit | 020f942e53e6d6f06828a0d962621b0f7ccebf52 (patch) | |
tree | 9047d847ad1c2e87cb4685171d9eefc793f4de7d /tests/training/validation/test_empty_valid_set_lm.sh | |
parent | 947952b6b6d1c9a95772ee251dfd59df776e8fcd (diff) |
Add tests for empty valid sets
Diffstat (limited to 'tests/training/validation/test_empty_valid_set_lm.sh')
-rw-r--r-- | tests/training/validation/test_empty_valid_set_lm.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/training/validation/test_empty_valid_set_lm.sh b/tests/training/validation/test_empty_valid_set_lm.sh new file mode 100644 index 0000000..2f94c0e --- /dev/null +++ b/tests/training/validation/test_empty_valid_set_lm.sh @@ -0,0 +1,24 @@ +#!/bin/bash -x + +# Exit on error +set -e + +# Test code goes here +rm -rf empty_valid_lm empty_valid_lm.log + +mkdir -p empty_valid_lm +touch empty_valid.en + +$MRT_MARIAN/build/marian \ + --no-shuffle --seed 1111 -o sgd --dim-emb 64 --dim-rnn 128 \ + --model empty_valid_lm/model.npz --type lm \ + -t $MRT_DATA/europarl.de-en/corpus.bpe.en -v vocab.en.yml \ + --disp-freq 2 --valid-freq 4 --after-batches 20 \ + --valid-metrics perplexity --valid-sets empty_valid.en \ + > empty_valid_lm.log 2>&1 || true + +test -e empty_valid_lm.log +grep -qi "file .* empty" empty_valid_lm.log + +# Exit with success code +exit 0 |