-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdvc.yaml
181 lines (181 loc) · 6 KB
/
dvc.yaml
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
stages:
# Ensure Annif is installed
install:
cmd:
- python3 -m venv venv
- source venv/bin/activate && pip install -U pip wheel setuptools && pip install -r requirements.txt
- cp requirements.txt venv-installed
deps:
- requirements.txt
outs:
- venv-installed:
cache: false
# Load YSO vocabulary
load-vocab:
cmd: venv/bin/annif load-vocab --force yso corpora/yso-skos.ttl
deps:
- venv-installed
- corpora/yso-skos.ttl
outs:
- data/vocabs/yso
# Train MLLM projects
train-mllm:
foreach:
- fi
- sv
- en
do:
cmd: venv/bin/annif train yso-mllm-${item} corpora/fulltext-train/${item}/*/ -j 16
deps:
- venv-installed
- corpora/fulltext-train/${item}
- data/vocabs/yso
params:
- projects.toml:
- yso-mllm-${item}
outs:
- data/projects/yso-mllm-${item}
# Train Omikuji Bonsai projects
train-omikuji:
foreach:
- fi
- sv
- en
do:
cmd: venv/bin/annif train yso-bonsai-${item} corpora/shorttext-train/${item}/yso-finna-${item}*.tsv.gz
deps:
- venv-installed
- corpora/shorttext-train/${item}/
- data/vocabs/yso
params:
- projects.toml:
- yso-bonsai-${item}
outs:
- data/projects/yso-bonsai-${item}
# Train fasttext projects
train-fasttext:
foreach:
- fi
- sv
- en
do:
cmd: venv/bin/annif train yso-fasttext-${item} corpora/shorttext-train/${item}/yso-finna-${item}*.tsv.gz
deps:
- venv-installed
- corpora/shorttext-train/${item}/
- data/vocabs/yso
params:
- projects.toml:
- yso-fasttext-${item}
outs:
- data/projects/yso-fasttext-${item}
# Train nn-ensemble projects
train-nn-ensemble:
foreach:
- fi
- sv
- en
do:
cmd: venv/bin/annif train yso-${item} corpora/fulltext-train/${item}/*/ -j 16
deps:
- venv-installed
- corpora/fulltext-train/${item}
- data/vocabs/yso
- data/projects/yso-mllm-${item}
- data/projects/yso-bonsai-${item}
- data/projects/yso-fasttext-${item}
params:
- projects.toml:
- yso-${item}
outs:
- data/projects/yso-${item}
# Evaluate Finnish projects
eval-fi:
foreach:
- mllm-fi
- bonsai-fi
- fasttext-fi
- fi
do:
cmd:
- venv/bin/annif eval yso-${item} -j 10 -m F1@5 -m NDCG --metrics-file reports/${item}-jyu-theses.json corpora/fulltext-test/fi/jyu-theses/
- venv/bin/annif eval yso-${item} -j 10 -m F1@5 -m NDCG --metrics-file reports/${item}-kirjaesittelyt2021.json corpora/fulltext-test/fi/kirjaesittelyt2021/
- venv/bin/annif eval yso-${item} -j 1 -m F1@5 -m NDCG --metrics-file reports/${item}-kirjastonhoitaja.json corpora/fulltext-test/fi/kirjastonhoitaja/
- venv/bin/annif eval yso-${item} -j 10 -m F1@5 -m NDCG --metrics-file reports/${item}-satakunnan-kansa.json corpora/fulltext-test/fi/satakunnan-kansa-?/
- venv/bin/annif eval yso-${item} -j 10 -m F1@5 -m NDCG --metrics-file reports/${item}-vapaakappaleet-orig.json corpora/fulltext-test/fi/vapaakappaleet-orig/
deps:
- venv-installed
- corpora/fulltext-test/fi
- data/projects/yso-${item}
params:
- projects.toml:
- yso-${item}
metrics:
- reports/${item}-jyu-theses.json:
cache: false
- reports/${item}-kirjaesittelyt2021.json:
cache: false
- reports/${item}-kirjastonhoitaja.json:
cache: false
- reports/${item}-satakunnan-kansa.json:
cache: false
- reports/${item}-vapaakappaleet-orig.json:
cache: false
# Evaluate Swedish projects
eval-sv:
foreach:
- mllm-sv
- bonsai-sv
- fasttext-sv
- sv
do:
cmd:
- venv/bin/annif eval yso-${item} -j 1 -m F1@5 -m NDCG --metrics-file reports/${item}-abo-theses.json corpora/fulltext-test/sv/abo-theses/
- venv/bin/annif eval yso-${item} -j 1 -m F1@5 -m NDCG --metrics-file reports/${item}-jyu-theses.json corpora/fulltext-test/sv/jyu-theses/
- venv/bin/annif eval yso-${item} -j 10 -m F1@5 -m NDCG --metrics-file reports/${item}-kirjaesittelyt2021.json corpora/fulltext-test/sv/kirjaesittelyt2021/
- venv/bin/annif eval yso-${item} -j 10 -m F1@5 -m NDCG --metrics-file reports/${item}-vapaakappaleet-orig.json corpora/fulltext-test/sv/vapaakappaleet-orig/
deps:
- venv-installed
- corpora/fulltext-test/sv
- data/projects/yso-${item}
params:
- projects.toml:
- yso-${item}
metrics:
- reports/${item}-abo-theses.json:
cache: false
- reports/${item}-jyu-theses.json:
cache: false
- reports/${item}-kirjaesittelyt2021.json:
cache: false
- reports/${item}-vapaakappaleet-orig.json:
cache: false
# Evaluate English projects
eval-en:
foreach:
- mllm-en
- bonsai-en
- fasttext-en
- en
do:
cmd:
- venv/bin/annif eval yso-${item} -j 1 -m F1@5 -m NDCG --metrics-file reports/${item}-abo-theses.json corpora/fulltext-test/en/abo-theses/
- venv/bin/annif eval yso-${item} -j 1 -m F1@5 -m NDCG --metrics-file reports/${item}-jyu-theses.json corpora/fulltext-test/en/jyu-theses/
- venv/bin/annif eval yso-${item} -j 10 -m F1@5 -m NDCG --metrics-file reports/${item}-kirjaesittelyt2021.json corpora/fulltext-test/en/kirjaesittelyt2021/
- venv/bin/annif eval yso-${item} -j 10 -m F1@5 -m NDCG --metrics-file reports/${item}-vapaakappaleet-orig.json corpora/fulltext-test/en/vapaakappaleet-orig/
deps:
- venv-installed
- corpora/fulltext-test/en
- data/projects/yso-${item}
params:
- projects.toml:
- yso-${item}
metrics:
- reports/${item}-abo-theses.json:
cache: false
- reports/${item}-jyu-theses.json:
cache: false
- reports/${item}-kirjaesittelyt2021.json:
cache: false
- reports/${item}-vapaakappaleet-orig.json:
cache: false