fix missing log file error
@@ -260,6 +260,7 @@ class KaldiModel(BaseModel): # TODO not thread safe
def get_train_results(self):
results = {}
+ if Path(self.config['run_log_path']).exists():
with self.config['run_log_path'].open() as log_file:
wer_lines = []
for line in reversed(list(log_file)):
@@ -280,7 +281,7 @@ class KaldiModel(BaseModel): # TODO not thread safe
ins_val = results_split[1].replace(' ins', '').strip()
del_val = results_split[2].replace(' del', '').strip()
sub_val = results_split[3].replace(' sub', '').strip()
- results = {"comparison_val": float(wer), # property common to all engines so the GUI can sort models by a result value
+ results = {"comparison_val": float(wer), # common for all engines so GUI can sort by a result value
"wer": float(wer),
"count_val": str(count_val),
"ins_val": int(ins_val),
