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

test_translation_script.sh « basics « training « tests - github.com/marian-nmt/marian-regression-tests.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 83b102cebb3ddeb49050b7b5f749d01ba7c8768b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash -x

# Exit on error
set -e

# Test code goes here
rm -rf trans trans.log trans_script.temp
mkdir -p trans

$MRT_MARIAN/build/marian \
    --seed 2222 --no-shuffle --dim-emb 128 --dim-rnn 256 --maxi-batch 1 --mini-batch 16 \
    -m trans/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 translation --valid-script-path ./trans_script.sh \
    --valid-sets trans.bpe.en trans.bpe.de \
    --valid-log trans.log

test -e vocab.en.yml
test -e vocab.de.yml
test -e trans/model.npz
test -e trans/model.npz.yml
test -e trans/model.npz.amun.yml

test -e trans.log

grep -q "/tmp/marian.*" trans_script.temp

$MRT_TOOLS/strip-timestamps.sh < trans.log | grep -v "Total translation time" | head -n 4 > trans.out
$MRT_TOOLS/diff-nums.py trans.out trans.expected -p 0.2 -o trans.diff

# Exit with success code
exit 0