Skip to content

Commit

Permalink
Fix config parsing (#583)
Browse files Browse the repository at this point in the history
* Fix config parsing

* Trigger CI

* Fix condition
  • Loading branch information
eu9ene authored May 13, 2024
1 parent da880da commit 77e95bf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@
[2022-06-24 07:31:51] [config] word-penalty: 0
[2022-06-24 07:31:51] [config] word-scores: false
[2022-06-24 07:31:51] [config] workspace: 8000
[2022-06-24 07:31:51] [config] Model is being created with Marian v1.10.25; e8a1a253 2021-12-07 17:47:33 +0000
[2022-06-24 07:31:51] [config] Loaded model has been created with Marian v1.12.14 2d067af 2024-02-16 11:44:13 -0500
[2022-06-24 07:31:51] Using synchronous SGD
[2022-06-24 07:31:51] [comm] Compiled without MPI support. Running as a single process on mlc4
[2022-06-24 07:31:51] Synced seed 1656048711
Expand Down
3 changes: 2 additions & 1 deletion tracking/translations_parser/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,8 @@ def parse_marian_context(self, logs_iter: Iterator[tuple[list[tuple[str]], str]]
logger.debug("Reading Marian configuration.")
config_yaml = ""
while ("config",) in headers:
if "Model is being created" in text:
# Marian incorrectly logs some messages with [config] prefix.
if "Model is being created" in text or "Loaded model has been created" in text:
headers, text = next(logs_iter)
break
config_yaml += f"{text}\n"
Expand Down

0 comments on commit 77e95bf

Please sign in to comment.