Skip to content
This repository has been archived by the owner on Oct 2, 2024. It is now read-only.

Commit

Permalink
Minor cleanup of unused / unneeded things (#348)
Browse files Browse the repository at this point in the history
  • Loading branch information
brianwgoldman authored Apr 2, 2024
1 parent 04aac27 commit c6dfc90
Show file tree
Hide file tree
Showing 13 changed files with 6 additions and 19 deletions.
2 changes: 0 additions & 2 deletions newhelm/annotation.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
from abc import ABC
from newhelm.typed_data import TypedData
from typing import List


class Annotation(TypedData):
Expand Down
1 change: 0 additions & 1 deletion newhelm/base_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
from newhelm.sut_capabilities import SUTCapability
from newhelm.tracked_object import TrackedObject
from newhelm.typed_data import Typeable, TypedData
from pydantic import BaseModel
from typing import Dict, List, Mapping, Sequence, Type


Expand Down
2 changes: 1 addition & 1 deletion newhelm/command_line.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import click
from newhelm.config import load_secrets_from_config, write_default_config
from newhelm.config import write_default_config


@click.group()
Expand Down
1 change: 0 additions & 1 deletion newhelm/concurrency.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,3 @@ def __enter__(self) -> T:

def __exit__(self, exc_type, exc_value, traceback) -> None:
self._lock.__exit__(exc_type, exc_value, traceback)
pass
1 change: 0 additions & 1 deletion newhelm/external_data.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import gdown # type: ignore
import os
import shutil
import tempfile
import urllib.request
Expand Down
5 changes: 1 addition & 4 deletions newhelm/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,13 @@
import hashlib
import importlib
import inspect
import json
import logging
import os
import shlex
import subprocess
import time
import uuid
from dataclasses import asdict, is_dataclass
from tqdm import tqdm
from typing import Any, Dict, List, Optional, Set, Type, TypeVar
from typing import Dict, List, Optional, Set, Type, TypeVar

# Type vars helpful in defining templates.
_InT = TypeVar("_InT")
Expand Down
1 change: 0 additions & 1 deletion newhelm/record_init.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import importlib
from functools import wraps
from newhelm.dependency_injection import (
inject_dependencies,
serialize_injected_dependencies,
Expand Down
2 changes: 1 addition & 1 deletion newhelm/single_turn_prompt_response.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from newhelm.annotation import Annotation
from newhelm.prompt import ChatPrompt, TextPrompt
from newhelm.sut import SUTCompletion, SUTResponse
from newhelm.sut import SUTCompletion
from newhelm.typed_data import TypedData
from pydantic import BaseModel, Field
from typing import Dict, List, Mapping, Optional, Type, TypeVar
Expand Down
5 changes: 2 additions & 3 deletions newhelm/test_decorator.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@
from newhelm.dependency_helper import DependencyHelper
from newhelm.prompt import ChatPrompt, TextPrompt
from newhelm.record_init import add_initialization_record
from newhelm.single_turn_prompt_response import TestItem, TestItemAnnotations
from newhelm.single_turn_prompt_response import TestItem
from newhelm.sut_capabilities import (
AcceptsChatPrompt,
AcceptsTextPrompt,
ProducesPerTokenLogProbabilities,
SUTCapability,
)
from pydantic import BaseModel
from typing import Any, Dict, List, Sequence, Type
from typing import List, Sequence, Type


def newhelm_test(requires_sut_capabilities: Sequence[Type[SUTCapability]]):
Expand Down
2 changes: 1 addition & 1 deletion plugins/standard_tests/newhelm/tests/safe.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from newhelm.test_decorator import newhelm_test
from newhelm.test_registry import TESTS
from pydantic import BaseModel
from typing import Any, Dict, List, Mapping
from typing import Dict, List, Mapping

HAZARDS_MAPPING = {
"ben": "Benign",
Expand Down
1 change: 0 additions & 1 deletion tests/test_cli.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import os
import pathlib
import pytest
from tests.utilities import expensive_tests

Expand Down
1 change: 0 additions & 1 deletion tests/test_instance_factory.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import pytest
from dataclasses import dataclass
from newhelm.instance_factory import FactoryEntry, InstanceFactory
from newhelm.secret_values import InjectSecret
from newhelm.tracked_object import TrackedObject
Expand Down
1 change: 0 additions & 1 deletion tests/test_test_decorator.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import pytest
from abc import ABC
from newhelm.base_test import BaseTest, PromptResponseTest
from newhelm.prompt import ChatPrompt, SUTOptions, TextPrompt
from newhelm.record_init import InitializationRecord
Expand Down

0 comments on commit c6dfc90

Please sign in to comment.