-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
57 lines (39 loc) · 1.62 KB
/
Makefile
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
#!/bin/bash
MODELS_HIEU=geovedi geovedi2 geovedi3 issue50 large-beam large-vocab rico small-vocab ensemble en-ro-wmt16-mlstm-amun mlstm-factors
TESTS_CPU=tests/test_en_de_cpu tests/test_en_de_cpu_nbest
TESTS_GPU=tests/test_en_de_gpu tests/test_en_de_gpu.nbest tests/test_en_de_gpu.return-alignment
TESTS_PYTHON=tests/test_python_bindings
AMUN=../amun/build/amun
#####################################################################
all: models
test-cpu:
AMUN=$(AMUN) bash -xe ./run_tests.sh $(TESTS_CPU)
test-gpu:
AMUN=$(AMUN) bash -xe ./run_tests.sh $(TESTS_GPU)
test-python:
AMUN=$(AMUN) bash -xe ./run_tests.sh $(TESTS_PYTHON)
test:
AMUN=$(AMUN) bash -xe ./run_tests.sh
#####################################################################
zip-models: $(patsubst %.tgz,%,$(wildcard models/*.tgz))
models: model-ende model-enfr models-hieu
%: %.tgz
tar xvf $^ -C models
models/%.tgz:
mkdir -p models
./scripts/download_models.py -u http://statmt.org/hieu/amun-regression-tests/$@ -w models
model-ende: models/model_en-de
models/model_en-de:
mkdir -p models
./scripts/download_models.py -m en-de -w models/model_en-de
model-enfr: models/model_en-fr
models/model_en-fr:
mkdir -p models
./scripts/download_models.py -u http://data.statmt.org/summa/mt/models/test/en-fr/en-fr.tgz -w models && cd models && tar xvf en-fr.tgz --transform "s|en-fr/|model_en-fr/|"
models-hieu: $(patsubst %,models/%,$(MODELS_HIEU))
#####################################################################
clean:
rm -f tests/*/test.out tests/*/test.diff tests/*/err
clean-models:
rm -rf models
.PHONY: clean clean-models models models-hieu zip-models