Skip to content

Commit

Permalink
Fix Kaldi stage_status num of args error (#308)
Browse files Browse the repository at this point in the history
  • Loading branch information
benfoley committed Sep 20, 2022
1 parent b558851 commit a34a8ee
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions elpis/engines/common/objects/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ def log(self, value: str):

@stage_status.setter
def stage_status(self, status_info: Tuple[str, str]):
# Caution: stage_status in the model accepts two args. Transcriber's stage_status accepts three.
stage, status = status_info
stage_status = self.config["stage_status"]
stage_status[stage]["status"] = status
Expand Down
1 change: 1 addition & 0 deletions elpis/engines/common/objects/transcription.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ def stage_status(self):

@stage_status.setter
def stage_status(self, vals: Tuple[str, str, str]):
# Caution: stage_status in the transcriber accepts three args. Model's stage_status only accepts two.
stage, status, message = vals
stage_status = self.config["stage_status"]
stage_status[stage]["status"] = status
Expand Down
2 changes: 1 addition & 1 deletion elpis/engines/kaldi/objects/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ def train():
print("stderr", error.stderr, file=file)
print("failed", file=file)
logger.error(f"Stage {stage} failed")
self.stage_status = (stage, "failed", "", "LOG-C")
self.stage_status = (stage, "failed")
break

def run_training_in_background():
Expand Down

0 comments on commit a34a8ee

Please sign in to comment.