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:
authorRoman Grundkiewicz <rgrundki@exseed.ed.ac.uk>2018-06-12 17:28:50 +0300
committerRoman Grundkiewicz <rgrundki@exseed.ed.ac.uk>2018-06-12 17:28:50 +0300
commit394688a327d82cfcaee382acef431ce3eec95f82 (patch)
tree9a08e804e641d2dfbed07d652070e8dad240475c /tests/training/validation
parent0f59ae9a972d0c3477f1814e901f4dcbe465d990 (diff)
Rename directories
Diffstat (limited to 'tests/training/validation')
-rw-r--r--tests/training/validation/.gitignore5
-rw-r--r--tests/training/validation/final_batch.expected3
-rw-r--r--tests/training/validation/final_epoch.expected3
-rw-r--r--tests/training/validation/final_match.expected3
-rw-r--r--tests/training/validation/setup.sh2
-rw-r--r--tests/training/validation/test_final_validation_after_batches.sh25
-rw-r--r--tests/training/validation/test_final_validation_after_batches_match.sh25
-rw-r--r--tests/training/validation/test_final_validation_after_epochs.sh28
-rw-r--r--tests/training/validation/valid.bpe.de10
-rw-r--r--tests/training/validation/valid.bpe.en10
10 files changed, 114 insertions, 0 deletions
diff --git a/tests/training/validation/.gitignore b/tests/training/validation/.gitignore
new file mode 100644
index 0000000..49e5167
--- /dev/null
+++ b/tests/training/validation/.gitignore
@@ -0,0 +1,5 @@
+final_batch
+final_match
+final_epoch
+train.bpe.*
+vocab.*.yml
diff --git a/tests/training/validation/final_batch.expected b/tests/training/validation/final_batch.expected
new file mode 100644
index 0000000..79f3542
--- /dev/null
+++ b/tests/training/validation/final_batch.expected
@@ -0,0 +1,3 @@
+[valid] Ep. 1 : Up. 60 : cross-entropy : 240.186 : new best
+[valid] Ep. 1 : Up. 120 : cross-entropy : 240.174 : new best
+[valid] Ep. 1 : Up. 150 : cross-entropy : 240.167 : new best
diff --git a/tests/training/validation/final_epoch.expected b/tests/training/validation/final_epoch.expected
new file mode 100644
index 0000000..a2cd5a4
--- /dev/null
+++ b/tests/training/validation/final_epoch.expected
@@ -0,0 +1,3 @@
+[valid] Ep. 1 : Up. 40 : cross-entropy : 240.19 : new best
+[valid] Ep. 1 : Up. 80 : cross-entropy : 240.182 : new best
+[valid] Ep. 2 : Up. 81 : cross-entropy : 240.182 : new best
diff --git a/tests/training/validation/final_match.expected b/tests/training/validation/final_match.expected
new file mode 100644
index 0000000..a33d988
--- /dev/null
+++ b/tests/training/validation/final_match.expected
@@ -0,0 +1,3 @@
+[valid] Ep. 1 : Up. 60 : cross-entropy : 240.186 : new best
+[valid] Ep. 1 : Up. 120 : cross-entropy : 240.174 : new best
+[valid] Ep. 1 : Up. 180 : cross-entropy : 240.161 : new best
diff --git a/tests/training/validation/setup.sh b/tests/training/validation/setup.sh
new file mode 100644
index 0000000..8b8cd07
--- /dev/null
+++ b/tests/training/validation/setup.sh
@@ -0,0 +1,2 @@
+test -f $MRT_DATA/europarl.de-en/corpus.bpe.en || exit 1
+test -f $MRT_DATA/europarl.de-en/corpus.bpe.de || exit 1
diff --git a/tests/training/validation/test_final_validation_after_batches.sh b/tests/training/validation/test_final_validation_after_batches.sh
new file mode 100644
index 0000000..804d451
--- /dev/null
+++ b/tests/training/validation/test_final_validation_after_batches.sh
@@ -0,0 +1,25 @@
+#!/bin/bash -x
+
+# Exit on error
+set -e
+
+# Test code goes here
+rm -rf final_batch final_batch.log vocab.*.yml
+mkdir -p final_batch
+
+$MRT_MARIAN/build/marian \
+ --no-shuffle --seed 1111 -o sgd --dim-emb 64 --dim-rnn 128 \
+ -m final_batch/model.npz -t $MRT_DATA/europarl.de-en/corpus.bpe.{en,de} \
+ -v vocab.en.yml vocab.de.yml --dim-vocabs 50000 50000 \
+ --disp-freq 30 --valid-freq 60 --after-batches 150 \
+ --valid-metrics cross-entropy --valid-sets valid.bpe.{en,de} \
+ --valid-log final_batch.log
+
+test -e final_batch/model.npz
+test -e final_batch.log
+
+$MRT_TOOLS/strip-timestamps.sh < final_batch.log > final_batch.out
+$MRT_TOOLS/diff-floats.py final_batch.out final_batch.expected -p 0.9 > final_batch.diff
+
+# Exit with success code
+exit 0
diff --git a/tests/training/validation/test_final_validation_after_batches_match.sh b/tests/training/validation/test_final_validation_after_batches_match.sh
new file mode 100644
index 0000000..c22b0a7
--- /dev/null
+++ b/tests/training/validation/test_final_validation_after_batches_match.sh
@@ -0,0 +1,25 @@
+#!/bin/bash -x
+
+# Exit on error
+set -e
+
+# Test code goes here
+rm -rf final_match final_match.log vocab.*.yml
+mkdir -p final_match
+
+$MRT_MARIAN/build/marian \
+ --no-shuffle --seed 1111 -o sgd --dim-emb 64 --dim-rnn 128 \
+ -m final_match/model.npz -t $MRT_DATA/europarl.de-en/corpus.bpe.{en,de} \
+ -v vocab.en.yml vocab.de.yml --dim-vocabs 50000 50000 \
+ --disp-freq 30 --valid-freq 60 --after-batches 180 \
+ --valid-metrics cross-entropy --valid-sets valid.bpe.{en,de} \
+ --valid-log final_match.log
+
+test -e final_match/model.npz
+test -e final_match.log
+
+$MRT_TOOLS/strip-timestamps.sh < final_match.log > final_match.out
+$MRT_TOOLS/diff-floats.py final_match.out final_match.expected -p 0.9 > final_match.diff
+
+# Exit with success code
+exit 0
diff --git a/tests/training/validation/test_final_validation_after_epochs.sh b/tests/training/validation/test_final_validation_after_epochs.sh
new file mode 100644
index 0000000..ba9c288
--- /dev/null
+++ b/tests/training/validation/test_final_validation_after_epochs.sh
@@ -0,0 +1,28 @@
+#!/bin/bash -x
+
+# Exit on error
+set -e
+
+# Test code goes here
+rm -rf final_epoch final_epoch.log vocab.small.*.yml
+mkdir -p final_epoch
+
+test -e train.bpe.en || head -n 3000 $MRT_DATA/europarl.de-en/corpus.bpe.en > train.bpe.en
+test -e train.bpe.de || head -n 3000 $MRT_DATA/europarl.de-en/corpus.bpe.de > train.bpe.de
+
+$MRT_MARIAN/build/marian \
+ --no-shuffle --seed 1111 -o sgd --dim-emb 64 --dim-rnn 128 \
+ -m final_epoch/model.npz -t train.bpe.{en,de} \
+ -v vocab.small.en.yml vocab.small.de.yml --dim-vocabs 50000 50000 \
+ --mini-batch 32 --disp-freq 20 --valid-freq 40 --after-epochs 1 \
+ --valid-metrics cross-entropy --valid-sets valid.bpe.{en,de} \
+ --valid-log final_epoch.log
+
+test -e final_epoch/model.npz
+test -e final_epoch.log
+
+$MRT_TOOLS/strip-timestamps.sh < final_epoch.log > final_epoch.out
+$MRT_TOOLS/diff-floats.py final_epoch.out final_epoch.expected -p 0.9 > final_epoch.diff
+
+# Exit with success code
+exit 0
diff --git a/tests/training/validation/valid.bpe.de b/tests/training/validation/valid.bpe.de
new file mode 100644
index 0000000..d27fbcd
--- /dev/null
+++ b/tests/training/validation/valid.bpe.de
@@ -0,0 +1,10 @@
+damit , meine Damen und Herren , hat das Parlament die Tagesordnung abge@@ arbeitet .
+das Protokoll dieser Sitzung wird dem Plenum zu Beginn der nächsten Sitzungsperiode zur Genehmigung vorgelegt .
+das Wort hat Herr M@@ anders zur Geschäftsordnung .
+Herr Präsident ! ich möchte diese Gelegenheit nutzen und Ihnen , dem Präsidium und allen Kolleginnen und Kollegen alles Gute für das neue Jahr wünschen .
+meine Damen und Herren ! bevor Sie mich verlassen , möchte ich allen Abgeordneten , allen Diensten , Beamten , Assistenten und sonstigen Mitarbeitern im Namen des Präsidiums danken und , wenn Sie mir gestatten - obwohl alle Mitarbeiter für uns arbeiten - , vielleicht speziell die Sprachen@@ dienste nennen , die uns helfen , damit wir uns hier verständigen können .
+ich möchte mir sogar erlauben , die Kommission und den Rat zu nennen , auch wenn sie nicht anwesend sind .
+ich will die Aussprache über &quot; Millennium ja , Millennium nein &quot; nicht noch einmal eröffnen , aber ich möchte Ihnen allen und darüber hinaus den von uns vertretenen europäischen Bürgern ein glück@@ liches Jahr 2000 wünschen .
+Unterbrechung der Sitzungsperiode
+ich erkläre die Sitzungsperiode des Europäischen Parlaments für unterbrochen .
+( die Sitzung wird um 10@@ .@@ 50 Uhr geschlossen . )
diff --git a/tests/training/validation/valid.bpe.en b/tests/training/validation/valid.bpe.en
new file mode 100644
index 0000000..c573859
--- /dev/null
+++ b/tests/training/validation/valid.bpe.en
@@ -0,0 +1,10 @@
+having said that , Parliament has reached the end of the agenda .
+the Minutes of the present sitting will be subject to Parliament &apos; s approval at the beginning of the next part @-@ session .
+Mr M@@ anders has the floor for a procedural motion .
+Mr President , I would like to take this opportunity to wish you , the Bureau and all Members , a good transition into the new year .
+ladies and gentlemen , before you leave me alone , I would like on behalf of the Bureau , once again , to thank all the Members , all the services , officials , assistants and other co @-@ workers and , if you will allow me - although all the co @-@ workers work for us - perhaps a special mention should go to the language services which help us to understand each other here .
+I would also like , although they are absent , to mention the Commission and the Council .
+I am not going to re @-@ open the &apos; Millennium or not the Millennium &apos; debate , but I am going to wish all of you , and by extension , all the citizens of Europe which we represent , a happy year 2000 .
+ad@@ journ@@ ment of the session
+I declare the session of the European Parliament adjourned .
+( the sitting was closed at 10@@ .@@ 50 a.m. )