Skip to content

Commit 44bbaf6

Browse files
committed
20250814154324
1 parent 52cbf7c commit 44bbaf6

2 files changed

Lines changed: 10 additions & 11 deletions

File tree

aws/lambda/pytorch-auto-revert/pytorch_auto_revert/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ def main(*args, **kwargs) -> None:
174174
os.environ.get("WORKFLOWS", "Lint,trunk,pull,inductor").split(","),
175175
do_restart=True,
176176
do_revert=True,
177-
hours=int(os.environ.get("HOURS", 48)),
177+
hours=int(os.environ.get("HOURS", 16)),
178178
verbose=True,
179179
dry_run=opts.dry_run,
180180
ignore_common_errors=True,

aws/lambda/pytorch-auto-revert/pytorch_auto_revert/testers/autorevert.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,6 @@ def autorevert_checker(
221221
print(f" ... and {len(pattern['failed_job_names']) - 5} more")
222222

223223
# Job coverage overlap logging removed (older_job_coverage dropped from pattern)
224-
225224
if revert_result and verbose:
226225
print(f"Revert message: {revert_result['revert_message'][:100]}...")
227226

@@ -281,7 +280,6 @@ def autorevert_checker(
281280
if len_non_ghfirst_reverts > 0
282281
else 0
283282
)
284-
# recall_non_ghfirst = 1 - ratio_non_ghfirst_reverts
285283
print(
286284
"Reverts (excluding ghfirst) that dont match any auto revert pattern detected (%): "
287285
+ f"({len_not_found_non_ghfirst}) ({ratio_non_ghfirst_reverts * 100:.1f}%)"
@@ -302,14 +300,15 @@ def autorevert_checker(
302300
else 0.0
303301
)
304302

305-
print()
306-
print("*********************************************************************")
307-
print("STATS SUMMARY:")
308-
print(f" PRECISION: {stats_precision * 100:.1f}%")
309-
print(f" RECALL: {stats_recall * 100:.1f}%")
310-
print(f" F1: {stats_f1 * 100:.1f}%")
311-
print("*********************************************************************")
312-
print()
303+
if verbose:
304+
print()
305+
print("*********************************************************************")
306+
print("STATS SUMMARY:")
307+
print(f" PRECISION: {stats_precision * 100:.1f}%")
308+
print(f" RECALL: {stats_recall * 100:.1f}%")
309+
print(f" F1: {stats_f1 * 100:.1f}%")
310+
print("*********************************************************************")
311+
print()
313312

314313
workflow_statistics = defaultdict(
315314
lambda: {"match_pattern": 0, "reverts": 0, "reverts_non_ghfirst": 0}

0 commit comments

Comments
 (0)