Skip to content

Commit

Permalink
init zscore with enough scope to cover its uses
Browse files Browse the repository at this point in the history
  • Loading branch information
leondz committed Jan 16, 2025
1 parent 0315908 commit f14c5ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion garak/evaluators/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,14 +164,14 @@ 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"
if sum(passes) < len(passes)
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
Expand Down

0 comments on commit f14c5ce

Please sign in to comment.