|
stages: |
|
|
|
install: |
|
cmd: |
|
- python3 -m venv venv |
|
- . 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 |
|
|
|
loadvoc: |
|
cmd: venv/bin/annif load-vocab --force kauno corpora/kauno-skos-reduced.ttl |
|
deps: |
|
- venv-installed |
|
- corpora/kauno-skos-reduced.ttl |
|
outs: |
|
- data/vocabs/kauno |
|
|
|
train-mllm: |
|
cmd: venv/bin/annif train kauno-mllm-fi -j 8 -d 2000 corpora/kirjasampo/kirjasampo-kauno-train.tsv |
|
deps: |
|
- venv-installed |
|
- corpora/kirjasampo/kirjasampo-kauno-train.tsv |
|
- data/vocabs/kauno |
|
outs: |
|
- data/projects/kauno-mllm-fi |
|
|
|
train-omikuji-ks: |
|
cmd: venv/bin/annif train kauno-ks-bonsai-fi -j 8 corpora/kirjasampo/kirjasampo-kauno-train.tsv |
|
deps: |
|
- venv-installed |
|
- corpora/kirjasampo/kirjasampo-kauno-train.tsv |
|
- data/vocabs/kauno |
|
outs: |
|
- data/projects/kauno-ks-bonsai-fi |
|
|
|
train-omikuji-finna: |
|
cmd: venv/bin/annif train kauno-finna-bonsai-fi -j 8 corpora/finna/kauno-finna-fin.tsv.gz |
|
deps: |
|
- venv-installed |
|
- corpora/finna/kauno-finna-fin.tsv.gz |
|
- data/vocabs/kauno |
|
outs: |
|
- data/projects/kauno-finna-bonsai-fi |
|
|
|
train-nn-ensemble: |
|
cmd: venv/bin/annif train -j 8 kauno-fi corpora/kirjasampo/kirjasampo-kauno-validate.tsv |
|
deps: |
|
- venv-installed |
|
- corpora/kirjasampo/kirjasampo-kauno-validate.tsv |
|
- data/vocabs/kauno |
|
- data/projects/kauno-mllm-fi |
|
- data/projects/kauno-ks-bonsai-fi |
|
- data/projects/kauno-finna-bonsai-fi |
|
outs: |
|
- data/projects/kauno-fi |
|
|
|
eval: |
|
foreach: |
|
- mllm-fi |
|
- ks-bonsai-fi |
|
- finna-bonsai-fi |
|
- fi |
|
do: |
|
cmd: |
|
- venv/bin/annif eval kauno-${item} -j 8 -m F1@5 -m NDCG --metrics-file reports/kauno-${item}.json corpora/kirjasampo/kirjasampo-kauno-test.tsv |
|
deps: |
|
- venv-installed |
|
- corpora/kirjasampo/kirjasampo-kauno-test.tsv |
|
- data/projects/kauno-${item} |
|
metrics: |
|
- reports/kauno-${item}.json: |
|
cache: false |
|
|