mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
[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:
parent
dabe2a3c3b
commit
f173623bb2
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -19,10 +19,15 @@ def get_test_prioritizations(
|
|||
print(f" {test}", file=file)
|
||||
|
||||
for heuristic in HEURISTICS:
|
||||
new_rankings: TestPrioritizations = heuristic.get_prediction_confidence(tests)
|
||||
aggregated_results.add_heuristic_results(heuristic, new_rankings)
|
||||
try:
|
||||
new_rankings: TestPrioritizations = heuristic.get_prediction_confidence(
|
||||
tests
|
||||
)
|
||||
aggregated_results.add_heuristic_results(heuristic, new_rankings)
|
||||
|
||||
print(f"Results from {heuristic.__class__.__name__}")
|
||||
print(new_rankings.get_info_str(verbose=False), file=file)
|
||||
print(f"Results from {heuristic.__class__.__name__}")
|
||||
print(new_rankings.get_info_str(verbose=False), file=file)
|
||||
except Exception as e:
|
||||
print(f"Error in {heuristic.__class__.__name__}: {e}", file=file)
|
||||
|
||||
return aggregated_results
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user