Skip to content

Commit d6bc4f3

Browse files
authored
aggregate.py: fix detection of no datapoints (#6523)
The existing check became obsolete once we added the --backends flag in PR #6392; in particular, len(speedups) could be 1 when a single backend is passed to --backends. Fix it and add a test to make sure we emit no output to stdout (note that the warning message goes to stderr).
1 parent 7da7ee4 commit d6bc4f3

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

benchmarks/aggregate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ def pr_latest(results_map: Dict[str, Any], args, timestamps: List[str]):
330330
list, zip(*sorted(zip(acc_map[label], acc_map[model_label]))))
331331
speedups[i] = list(map(pr_round, speedups[i]))
332332
break
333-
if not speedups[0] or not speedups[1]:
333+
if all(not x for x in speedups):
334334
logger.warning(f'cannot find data for accelerator {args.accelerator}')
335335
return
336336

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# ARGS: --backends openxla+lazytensor --

0 commit comments

Comments
 (0)