From c8c394e7a281aa28ce98abae49928fae3dc1a6b7 Mon Sep 17 00:00:00 2001 From: Lukas Burkhalter <10532077+lubux@users.noreply.github.com> Date: Fri, 8 Nov 2024 16:20:18 +0100 Subject: [PATCH] Handle unknown results (#3) --- compare_with_baseline.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/compare_with_baseline.py b/compare_with_baseline.py index 3f47d3f..1d66b74 100644 --- a/compare_with_baseline.py +++ b/compare_with_baseline.py @@ -108,6 +108,7 @@ def to_string(self): NEUTRAL = "Neutral" SUCCESS = "Success" FAILURE = "Failure" +UNKNOWN = "Unknown" def compare_results(baseline_result, target_result): @@ -115,6 +116,8 @@ def compare_results(baseline_result, target_result): baseline_score = baseline_result["score"] if baseline_score == target_score: return ResultChange.UNCHANGED + elif target_score == UNKNOWN: + return ResultChange.REGRESSION elif target_score == FAILURE or (target_score == NEUTRAL and baseline_score == SUCCESS): return ResultChange.REGRESSION elif target_score == SUCCESS or (target_score == NEUTRAL and baseline_score == FAILURE):