[td] try catch exception, do not run td if not results (#138087)

Fixes #ISSUE_NUMBER

Pull Request resolved: https://github.com/pytorch/pytorch/pull/138087
Approved by: https://github.com/wdvr
This commit is contained in:
Catherine Lee
2024-10-16 18:04:25 +00:00
committed by PyTorch MergeBot
parent dabe2a3c3b
commit f173623bb2
2 changed files with 11 additions and 4 deletions

View File

@ -1769,6 +1769,8 @@ def main():
selected_tests = get_selected_tests(options)
test_prioritizations = import_results()
if len(test_prioritizations.get_all_tests()) == 0:
options.enable_td = False
test_prioritizations.amend_tests(selected_tests)
os.makedirs(REPO_ROOT / "test" / "test-reports", exist_ok=True)