From cecc8735c4c703b13d7ab5b43813d89bcf613b21 Mon Sep 17 00:00:00 2001 From: chenfeiyu Date: Fri, 11 Dec 2020 11:58:57 +0800 Subject: [PATCH] 1. fix ExperimentBase, create ouput folder with parent, 2. fix stop condition --- parakeet/training/experiment.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/parakeet/training/experiment.py b/parakeet/training/experiment.py index 846947d..9804d4c 100644 --- a/parakeet/training/experiment.py +++ b/parakeet/training/experiment.py @@ -109,7 +109,7 @@ class ExperimentBase(object): def train(self): self.new_epoch() - while self.iteration <= self.config.training.max_iteration: + while self.iteration < self.config.training.max_iteration: self.iteration += 1 self.train_batch() @@ -131,7 +131,7 @@ class ExperimentBase(object): def setup_output_dir(self): # output dir output_dir = Path(self.args.output).expanduser() - output_dir.mkdir(exist_ok=True) + output_dir.mkdir(parents=True, exist_ok=True) self.output_dir = output_dir