From 30b10fa07682dd1a67968adef0018aecc5b6fb10 Mon Sep 17 00:00:00 2001 From: dhosterman Date: Fri, 2 Feb 2024 12:25:54 -0500 Subject: [PATCH] sorting/optimizing imports --- src/coffee/benchmark.py | 2 +- src/coffee/helm_interface.py | 2 +- src/coffee/run.py | 7 ++----- src/coffee/static_site_generator.py | 1 - src/dubious_helm_cli_wrapper.py | 2 +- 5 files changed, 5 insertions(+), 9 deletions(-) diff --git a/src/coffee/benchmark.py b/src/coffee/benchmark.py index 42181802..74eb57c1 100644 --- a/src/coffee/benchmark.py +++ b/src/coffee/benchmark.py @@ -4,7 +4,7 @@ import casefy -from coffee.helm_runner import BbqHelmTest, HelmTest, RealToxicityPromptsHelmTest, HelmSut +from coffee.helm_runner import BbqHelmTest, HelmSut, HelmTest, RealToxicityPromptsHelmTest def float_to_stars(value: float) -> float: diff --git a/src/coffee/helm_interface.py b/src/coffee/helm_interface.py index 5d990b5a..043fbc07 100644 --- a/src/coffee/helm_interface.py +++ b/src/coffee/helm_interface.py @@ -1,5 +1,5 @@ import subprocess -from typing import Iterable, TYPE_CHECKING +from typing import Iterable import helm.benchmark.run_specs from helm.benchmark.config_registry import ( diff --git a/src/coffee/run.py b/src/coffee/run.py index df727cd3..6a10dc3d 100644 --- a/src/coffee/run.py +++ b/src/coffee/run.py @@ -7,11 +7,8 @@ import termcolor import coffee -from coffee.benchmark import ( - GeneralChatBotBenchmarkDefinition, - BenchmarkScore, -) -from coffee.helm import HelmSut, CliHelmRunner, HelmResult +from coffee.benchmark import BenchmarkScore, GeneralChatBotBenchmarkDefinition +from coffee.helm_runner import CliHelmRunner, HelmResult, HelmSut from coffee.static_site_generator import StaticSiteGenerator diff --git a/src/coffee/static_site_generator.py b/src/coffee/static_site_generator.py index 120501c0..c456807d 100644 --- a/src/coffee/static_site_generator.py +++ b/src/coffee/static_site_generator.py @@ -2,7 +2,6 @@ import pathlib import shutil from itertools import groupby -from typing import Iterator from jinja2 import Environment, PackageLoader, select_autoescape from markupsafe import Markup diff --git a/src/dubious_helm_cli_wrapper.py b/src/dubious_helm_cli_wrapper.py index c0788f32..6461ed07 100644 --- a/src/dubious_helm_cli_wrapper.py +++ b/src/dubious_helm_cli_wrapper.py @@ -1,5 +1,5 @@ -from helm.benchmark.run import main import helm.benchmark.run_specs +from helm.benchmark.run import main helm.benchmark.run_specs.INCLUDE_GENERATIVE_HARMS_METRICS = True if __name__ == "__main__":