From 8df6ec231fc7686f9a5353afef6a84e01754645f Mon Sep 17 00:00:00 2001 From: Sean Sube Date: Thu, 23 Nov 2023 23:22:51 -0600 Subject: [PATCH] fix(scripts): improve MSE logging in release tests --- api/scripts/test-release.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/api/scripts/test-release.py b/api/scripts/test-release.py index e46843a2..fbd5a6b8 100644 --- a/api/scripts/test-release.py +++ b/api/scripts/test-release.py @@ -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