From f14c5ce769987bcf22d7d202c4154721b2db5005 Mon Sep 17 00:00:00 2001 From: Leon Derczynski Date: Thu, 16 Jan 2025 14:43:18 +0100 Subject: [PATCH] init zscore with enough scope to cover its uses --- garak/evaluators/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/garak/evaluators/base.py b/garak/evaluators/base.py index b8918eaa..de6e59f0 100644 --- a/garak/evaluators/base.py +++ b/garak/evaluators/base.py @@ -164,6 +164,7 @@ def get_z_rating(self, probe_name, detector_name, asr_pct) -> str: def print_results_wide(self, detector_name, passes, messages): """Print the evaluator's summary""" + zscore = None if len(passes): outcome = ( Fore.LIGHTRED_EX + "FAIL" @@ -171,7 +172,6 @@ def print_results_wide(self, detector_name, passes, messages): else Fore.LIGHTGREEN_EX + "PASS" ) failrate = 100 * (len(passes) - sum(passes)) / len(passes) - zscore = None if _config.system.show_z: zscore, rating_symbol = self.get_z_rating( self.probename, detector_name, failrate