From da67e989639948ea1cfdf8befd8cc9090370a914 Mon Sep 17 00:00:00 2001 From: Oliver Adams Date: Wed, 13 Nov 2019 11:11:41 +0000 Subject: [PATCH] fixed bug where reference transcriptions weren't written. --- changelog.md | 1 + persephone/model.py | 2 +- tox.ini | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/changelog.md b/changelog.md index 3530e1d..c20e931 100644 --- a/changelog.md +++ b/changelog.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. ## [0.4.1] - 2019-11-13 - Bugfix for an assertion that checked for equality of floating points. +- Bugfix where reference transcription wasn't written. ## [0.4.0] - 2019-08-31 diff --git a/persephone/model.py b/persephone/model.py index b0179d6..ea29985 100644 --- a/persephone/model.py +++ b/persephone/model.py @@ -421,7 +421,7 @@ def train(self, *, early_stopping_steps: int = 10, min_epochs: int = 30, "w", encoding=ENCODING) as hyps_f: for hyp in hyps: print(" ".join(hyp), file=hyps_f) - if epoch == 0: + if epoch == 1: with open(os.path.join(hyps_dir, "refs"), "w", encoding=ENCODING) as refs_f: for ref in refs: diff --git a/tox.ini b/tox.ini index 06a1108..b9ef64f 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist=py35,py36 +envlist=py35,py36,py37 [testenv] deps= -r{toxinidir}/test_requirements.txt