diff options
author | Pedro Coelho <pedrodiascoelho97@gmail.com> | 2021-02-23 21:25:14 +0300 |
---|---|---|
committer | Pedro Coelho <pedrodiascoelho97@gmail.com> | 2021-02-23 21:25:14 +0300 |
commit | 016e61fbfb8826bc7da7332d370969910ca521b7 (patch) | |
tree | 1a1993ba66e3627f271afcb93736864f14b55e68 /tests | |
parent | 3fca60b415155ee743002adae1f43c5a938de936 (diff) |
All tests in a single folder now. Removed vocabs
Diffstat (limited to 'tests')
-rw-r--r-- | tests/decoder/factors/setup.sh | 15 | ||||
-rw-r--r-- | tests/factors/factors.expected (renamed from tests/training/features/factors/factors.expected) | 0 | ||||
-rw-r--r-- | tests/factors/factors_decoder.expected (renamed from tests/decoder/factors/factors.expected) | 0 | ||||
-rwxr-xr-x | tests/factors/setup.sh (renamed from tests/training/features/factors/setup.sh) | 5 | ||||
-rw-r--r-- | tests/factors/test_factors.sh (renamed from tests/training/features/factors/test_factors.sh) | 0 | ||||
-rw-r--r-- | tests/factors/test_factors_decoder.sh (renamed from tests/decoder/factors/test_factors.sh) | 12 | ||||
-rw-r--r-- | tests/factors/text.in (renamed from tests/decoder/factors/text.in) | 0 |
7 files changed, 11 insertions, 21 deletions
diff --git a/tests/decoder/factors/setup.sh b/tests/decoder/factors/setup.sh deleted file mode 100644 index fbbfad6..0000000 --- a/tests/decoder/factors/setup.sh +++ /dev/null @@ -1,15 +0,0 @@ -#!/bin/bash -x - -##################################################################### -# AUTHOR: pedrodiascoelho -##################################################################### - -# Exit on error -set -e - -# Test code goes here -test -f $MRT_MODELS/factors/model.npz || exit 1 -test -f $MRT_MODELS/factors/model.npz.decoder.yml || exit 1 - -# Exit with success code -exit 0 diff --git a/tests/training/features/factors/factors.expected b/tests/factors/factors.expected index 70ee0cf..70ee0cf 100644 --- a/tests/training/features/factors/factors.expected +++ b/tests/factors/factors.expected diff --git a/tests/decoder/factors/factors.expected b/tests/factors/factors_decoder.expected index 6ef8ae8..6ef8ae8 100644 --- a/tests/decoder/factors/factors.expected +++ b/tests/factors/factors_decoder.expected diff --git a/tests/training/features/factors/setup.sh b/tests/factors/setup.sh index faa043c..7e32b3a 100755 --- a/tests/training/features/factors/setup.sh +++ b/tests/factors/setup.sh @@ -8,6 +8,11 @@ set -e # Test code goes here +test -f $MRT_MODELS/factors/model.npz || exit 1 +test -f $MRT_MODELS/factors/model.npz.decoder.yml || exit 1 +test -f $MRT_MODELS/factors/vocab.en.fsv || exit 1 +test -f $MRT_MODELS/factors/vocab.de.fsv || exit 1 + test -f $MRT_DATA/europarl.de-en/toy.bpe.en || exit 1 test -f $MRT_DATA/europarl.de-en/toy.bpe.de || exit 1 diff --git a/tests/training/features/factors/test_factors.sh b/tests/factors/test_factors.sh index 193ff37..193ff37 100644 --- a/tests/training/features/factors/test_factors.sh +++ b/tests/factors/test_factors.sh diff --git a/tests/decoder/factors/test_factors.sh b/tests/factors/test_factors_decoder.sh index ccda2c6..141a8cc 100644 --- a/tests/decoder/factors/test_factors.sh +++ b/tests/factors/test_factors_decoder.sh @@ -10,17 +10,17 @@ set -e # Remove old artifacts -rm -f factors.{out,diff,log} +rm -f factors_decoder.{out,diff,log} # Run marian decoder -$MRT_MARIAN/marian-decoder -c $MRT_MODELS/factors/model.npz.decoder.yml --log factors.log < text.in > factors.out +$MRT_MARIAN/marian-decoder -c $MRT_MODELS/factors/model.npz.decoder.yml --log factors_decoder.log < text.in > factors_decoder.out -#checks factors usage -grep -q "Factored embeddings enabled" factors.log -grep -q "Factored outputs enabled" factors.log +#checks factors_decoder usage +grep -q "Factored embeddings enabled" factors_decoder.log +grep -q "Factored outputs enabled" factors_decoder.log # Compare the output with the expected output -$MRT_TOOLS/diff.sh factors.out factors.expected > factors.diff +$MRT_TOOLS/diff.sh factors_decoder.out factors_decoder.expected > factors_decoder.diff # Exit with success code exit 0 diff --git a/tests/decoder/factors/text.in b/tests/factors/text.in index 0484e47..0484e47 100644 --- a/tests/decoder/factors/text.in +++ b/tests/factors/text.in |