Skip to content

Commit

Permalink
Merge pull request BVLC#4979 from davidbrai/allow-parse_log-to-skip-l…
Browse files Browse the repository at this point in the history
…ines

Support solver resumes in parse_log.py
  • Loading branch information
shelhamer authored Nov 18, 2016
2 parents 28c135c + aaf7b6b commit 32c2ce6
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions tools/extra/parse_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,13 @@ def parse_log(path_to_log):
# iteration
continue

time = extract_seconds.extract_datetime_from_line(line,
logfile_year)
try:
time = extract_seconds.extract_datetime_from_line(line,
logfile_year)
except ValueError:
# Skip lines with bad formatting, for example when resuming solver
continue

seconds = (time - start_time).total_seconds()

learning_rate_match = regex_learning_rate.search(line)
Expand Down

0 comments on commit 32c2ce6

Please sign in to comment.