Skip to content

Commit

Permalink
aggregate.py: fix detection of no datapoints (#6523)
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
cota authored Feb 13, 2024
1 parent 7da7ee4 commit d6bc4f3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion benchmarks/aggregate.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ def pr_latest(results_map: Dict[str, Any], args, timestamps: List[str]):
list, zip(*sorted(zip(acc_map[label], acc_map[model_label]))))
speedups[i] = list(map(pr_round, speedups[i]))
break
if not speedups[0] or not speedups[1]:
if all(not x for x in speedups):
logger.warning(f'cannot find data for accelerator {args.accelerator}')
return

Expand Down
1 change: 1 addition & 0 deletions test/benchmarks/a6000.training.latest.empty.test
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# ARGS: --backends openxla+lazytensor --

0 comments on commit d6bc4f3

Please sign in to comment.