Skip to content

Commit

Permalink
Update to reruns + timeouts in run_test.py (#100412)
Browse files Browse the repository at this point in the history
https://github.com/pytorch/pytorch/pull/100200/files made unknown tests more likely to fail b/c lacking test times but still have time outs, so fix that
Pull Request resolved: #100412
Approved by: https://github.com/huydhn
  • Loading branch information
clee2000 authored and pytorchmergebot committed May 1, 2023
1 parent 29b2745 commit e88e92e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/run_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,13 @@ def run_test(

command = (launcher_cmd or []) + executable + argv
should_file_rerun = "--subprocess" not in command and not RERUN_DISABLED_TESTS
timeout = THRESHOLD * 3 if should_file_rerun else None
timeout = (
THRESHOLD * 3
if should_file_rerun
and isinstance(test_module, ShardedTest)
and test_module.time is not None
else None
)
print_to_stderr("Executing {} ... [{}]".format(command, datetime.now()))

with open(log_path, "w") as f:
Expand Down

0 comments on commit e88e92e

Please sign in to comment.