Skip to content

Commit

Permalink
adjust plmc log parsing regex
Browse files Browse the repository at this point in the history
  • Loading branch information
thomashopf committed Dec 3, 2024
1 parent 4a57dff commit 7aa49ea
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions evcouplings/couplings/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ def parse_plmc_log(log):
"seqs": re.compile("(\d+) valid sequences out of (\d+)"),
"sites": re.compile("(\d+) sites out of (\d+)"),
"region": re.compile("Region starts at (\d+)"),
"samples": re.compile("Effective number of samples: (\d+\.\d+)"),
# first match group catches ' (to 1 decimal place)' when loading existing weights file
"samples": re.compile("Effective number of samples(.*): (\d+\.\d+)"),
"optimization": re.compile("Gradient optimization: (.+)")
}

Expand Down Expand Up @@ -95,7 +96,7 @@ def parse_plmc_log(log):
pass

valid_seqs, total_seqs = map(int, matches["seqs"])
eff_samples = float(matches["samples"][0])
eff_samples = float(matches["samples"][1])
opt_status = matches["optimization"][0]

return (
Expand Down

0 comments on commit 7aa49ea

Please sign in to comment.