Skip to content

Commit

Permalink
Remove anonymize bug
Browse files Browse the repository at this point in the history
  • Loading branch information
bkorycki committed Dec 17, 2024
1 parent 393da2d commit 2cf9b29
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/modelbench/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
from modelgauge.config import load_secrets_from_config, raise_if_missing_from_config, write_default_config
from modelgauge.load_plugins import load_plugins
from modelgauge.sut import SUT
from modelgauge.sut_decorator import modelgauge_sut
from modelgauge.sut_registry import SUTS
from modelgauge.tests.safe_v1 import PROMPT_SETS, Locale

Expand Down Expand Up @@ -267,6 +268,11 @@ def run_benchmarks_for_suts(benchmarks, suts, max_instances, debug=False, json_l
return run


@modelgauge_sut(capabilities=[])
class AnonSUT(SUT):
pass


def print_summary(benchmark, benchmark_scores, anonymize):
if anonymize:
rng = random.Random(anonymize)
Expand All @@ -276,7 +282,7 @@ def print_summary(benchmark, benchmark_scores, anonymize):
for bs in benchmark_scores:
counter += 1
uid = f"sut{counter:02d}"
bs.sut = SUT(uid)
bs.sut = AnonSUT(uid)

echo(termcolor.colored(f"\nBenchmarking complete for {benchmark.uid}.", "green"))
console = Console()
Expand Down

0 comments on commit 2cf9b29

Please sign in to comment.