-
Notifications
You must be signed in to change notification settings - Fork 284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix counting of failures in PyTorch tests #2834
fix counting of failures in PyTorch tests #2834
Conversation
b9e553e
to
4e8a97e
Compare
Co-authored-by: Simon Branford <[email protected]>
Fixed yet another issue and tried to refactor it a bit to avoid more: Using Also in a PyTorch PR there was a syntax error in one of the tests but EB reported "Test command had non-zero exit code (1), but no failed tests found?!" Similar if there were even a single test which failed then those syntax errors would have been undetected. I hence added my RegEx back which searches for failed test suites and if that doesn't match the ones we checked by the 2 custom regexes it will be reported as an error not taking the number of tests into account. I also include the failed test names in the error message for that case. Edit: And finally fixed the minor spelling issue where it reported "0 failure" (missing "s") |
Test report by @branfosj Overview of tested easyconfigs (in order)
Build succeeded for 1 out of 1 (1 easyconfigs in total) |
Going in, thanks @Flamefire! |
(created using
eb --new-pr
)The RegExp handling was wrong, e.g. for an output of:
the
summary_matches_pattern2
will yield"2 failed, 128 passed, 2 skipped, 2 warnings in 8.66s"
which does not matchr"^.*[^0-9](?Pfailures[0-9]+) failed.*$"
because there is nothing in front of the number.This PR does a bit of refactoring to avoid this: Instead of creating
summary_matches_pattern2
out of a RegEx match and using it in 2 places way below where the exact RegEx might be already forgotten I combined the counting of errors/failures with the summary-message generation and moved the RegEx right on top of the loop handling it and added comments with examples.Also the anchors and named group is not required:
r"^.*[^0-9](?Pfailures[0-9]+) failed.*$"
->r"([0-9]+) failed"
which is much cleaner to read.Finally my commit to also count tests terminated by a signal was lost so I readded it and reformatted the RegEx assignment to make it easier to read
And as a drive-by fix I added a docstring to
get_count_for_pattern
and made it return0
instead ofNone
for the case where the warning is shown.