1
0
Fork 0

fix(scripts): improve MSE logging in release tests

This commit is contained in:
Sean Sube 2023-11-23 23:22:51 -06:00
parent 34493e7968
commit 8df6ec231f
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
1 changed files with 4 additions and 3 deletions

View File

@ -476,11 +476,12 @@ def run_test(
ref = Image.open(ref_name) if path.exists(ref_name) else None ref = Image.open(ref_name) if path.exists(ref_name) else None
mse = find_mse(result, ref) mse = find_mse(result, ref)
threshold = test.mse_threshold * mse_mult
if mse < (test.mse_threshold * mse_mult): if mse < threshold:
logger.info("MSE within threshold: %.5f < %.5f", mse, test.mse_threshold) logger.info("MSE within threshold: %.5f < %.5f", mse, threshold)
else: else:
logger.warning("MSE above threshold: %.5f > %.5f", mse, test.mse_threshold) logger.warning("MSE above threshold: %.5f > %.5f", mse, threshold)
passed = False passed = False
return passed return passed