Skip to content

Commit

Permalink
Update light_benchmark.py (#273)
Browse files Browse the repository at this point in the history
* Update light_benchmark.py

Trunc score at 10^-2 when comparing performance results between PR and main branches.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
gcattan and pre-commit-ci[bot] committed Apr 28, 2024
1 parent f050210 commit 6f2fc0e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion benchmarks/light_benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,5 +157,8 @@ def set_output(key: str, value: str):
for key, score in scores.items():
i = i + 1
pr_score = sys.argv[i]
success = success and (True if float(pr_score) >= score else False)
pr_score_trun = int(float(pr_score) * 100)
score_trun = int(score * 100)
success = success and (True if pr_score_trun >= score_trun else False)
print(f"{key}: {pr_score_trun} (PR) >= {score} (main): {success}")
set_output("success", "1" if success else "0")

0 comments on commit 6f2fc0e

Please sign in to comment.