Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/marian-nmt/marian-regression-tests.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tests/interface/input-tsv/test_error_msg_for_identical_align_and_weight_indices.sh')
-rw-r--r--tests/interface/input-tsv/test_error_msg_for_identical_align_and_weight_indices.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/interface/input-tsv/test_error_msg_for_identical_align_and_weight_indices.sh b/tests/interface/input-tsv/test_error_msg_for_identical_align_and_weight_indices.sh
new file mode 100644
index 0000000..9ba1cdb
--- /dev/null
+++ b/tests/interface/input-tsv/test_error_msg_for_identical_align_and_weight_indices.sh
@@ -0,0 +1,26 @@
+#!/bin/bash -x
+
+#####################################################################
+# SUMMARY: Indices for guided-alignment and data-weighting must differ
+# TAGS: sentencepiece tsv train align
+#####################################################################
+
+# Exit on error
+set -e
+
+# Remove old artifacts and create working directory
+rm -rf msg_align_weight_same_ids msg_align_weight_same_ids.log
+mkdir -p msg_align_weight_same_ids
+
+# Run marian command
+$MRT_MARIAN/marian \
+ --no-shuffle --seed 1111 -m msg_align_weight_same_ids/model.npz \
+ --tsv -t train2.de-w-en-aln.tsv -v msg_align_weight_same_ids/vocab.spm msg_align_weight_same_ids/vocab.spm --dim-vocabs 2000 2000 \
+ --after-batches 1 --guided-alignment 3 --data-weighting 3 \
+ > msg_align_weight_same_ids.log 2>&1 || true
+
+test -e msg_align_weight_same_ids.log
+grep -qi "tsv .*alignment .*weighting must.* be different" msg_align_weight_same_ids.log
+
+# Exit with success code
+exit 0