Skip to content

Commit

Permalink
Merge pull request #2840 from Flamefire/20221130095434_new_pr_pytorch
Browse files Browse the repository at this point in the history
Fix Python 2.7 compatibility of PyTorch easyblock
  • Loading branch information
branfosj authored Nov 30, 2022
2 parents dcd4148 + e7839ea commit a01e2a8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions easybuild/easyblocks/p/pytorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ def get_count_for_pattern(regex, text):

for m in re.finditer(regex, tests_out, re.M):
# E.g. 'failures=3, errors=10, skipped=190, expected failures=6'
failure_summary = m['failure_summary']
failure_summary = m.group('failure_summary')
total, test_suite = m.group('test_cnt', 'failed_test_suite_name')
failure_report += "{test_suite} ({total} total tests, {failure_summary})\n".format(
test_suite=test_suite, total=total, failure_summary=failure_summary
Expand All @@ -316,8 +316,8 @@ def get_count_for_pattern(regex, text):

for m in re.finditer(regex, tests_out, re.M):
# E.g. '2 failed, 128 passed, 2 skipped, 2 warnings'
failure_summary = m['failure_summary']
test_suite = m['failed_test_suite_name']
failure_summary = m.group('failure_summary')
test_suite = m.group('failed_test_suite_name')
failure_report += "{test_suite} ({failure_summary})\n".format(
test_suite=test_suite, failure_summary=failure_summary
)
Expand Down

0 comments on commit a01e2a8

Please sign in to comment.