Skip to content

Commit

Permalink
fix(scripts): improve MSE logging in release tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Nov 24, 2023
1 parent 34493e7 commit 8df6ec2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions api/scripts/test-release.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,11 +476,12 @@ def run_test(
ref = Image.open(ref_name) if path.exists(ref_name) else None

mse = find_mse(result, ref)
threshold = test.mse_threshold * mse_mult

if mse < (test.mse_threshold * mse_mult):
logger.info("MSE within threshold: %.5f < %.5f", mse, test.mse_threshold)
if mse < threshold:
logger.info("MSE within threshold: %.5f < %.5f", mse, threshold)
else:
logger.warning("MSE above threshold: %.5f > %.5f", mse, test.mse_threshold)
logger.warning("MSE above threshold: %.5f > %.5f", mse, threshold)
passed = False

return passed
Expand Down

0 comments on commit 8df6ec2

Please sign in to comment.