Skip to content

Commit

Permalink
fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanMarten committed Dec 18, 2024
1 parent 4d4c7a5 commit 7d9cff3
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/bespokelabs/curator/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from pydantic import BaseModel

from bespokelabs.curator.llm.prompt_formatter import PromptFormatter
from bespokelabs.curator.request_processor.generic_response import GenericResponse
from bespokelabs.curator.types.generic_response import GenericResponse

T = TypeVar("T")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import litellm

from bespokelabs.curator.dataset import Dataset
from bespokelabs.curator.prompter.prompt_formatter import PromptFormatter
from bespokelabs.curator.llm.prompt_formatter import PromptFormatter
from bespokelabs.curator.request_processor.base_request_processor import (
parse_response_message,
BaseRequestProcessor,
Expand Down Expand Up @@ -121,7 +121,7 @@ def requests_from_generic_request_file(self, request_file: str) -> list[dict]:
return api_specific_requests

def generic_response_file_from_responses(
self, responses: str, batch: BetaMessageBatch, response_file: str
self, responses: str, batch: GenericBatchObject, response_file: str
) -> str | None:
"""Processes API-specific responses and creates a generic response file.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

from bespokelabs.curator.dataset import Dataset
from bespokelabs.curator.request_processor.base_request_processor import BaseRequestProcessor
from bespokelabs.curator.prompter.prompt_formatter import PromptFormatter
from bespokelabs.curator.llm.prompt_formatter import PromptFormatter
from bespokelabs.curator.status_tracker.online_status_tracker import OnlineStatusTracker
from bespokelabs.curator.types.generic_request import GenericRequest
from bespokelabs.curator.request_processor.event_loop import run_in_event_loop
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from bespokelabs.curator.request_processor.base_online_request_processor import APIRequest
from bespokelabs.curator.status_tracker.online_status_tracker import OnlineStatusTracker
from bespokelabs.curator.types.generic_request import GenericRequest
from bespokelabs.curator.request_processor.generic_response import TokenUsage, GenericResponse
from bespokelabs.curator.types.generic_response import TokenUsage, GenericResponse
from pydantic import BaseModel
import time

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from bespokelabs.curator.request_processor.base_online_request_processor import APIRequest
from bespokelabs.curator.status_tracker.online_status_tracker import OnlineStatusTracker
from bespokelabs.curator.types.generic_request import GenericRequest
from bespokelabs.curator.request_processor.generic_response import TokenUsage, GenericResponse
from bespokelabs.curator.types.generic_response import TokenUsage, GenericResponse

T = TypeVar("T")
logger = logger = logging.getLogger(__name__)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@
import tqdm

from dataclasses import dataclass, field
from bespokelabs.curator.request_processor.base_online_request_processor import SECONDS_TO_PAUSE_ON_RATE_LIMIT
from bespokelabs.curator.request_processor.base_online_request_processor import (
SECONDS_TO_PAUSE_ON_RATE_LIMIT,
)

logger = logging.getLogger(__name__)


@dataclass
class OnlineStatusTracker:
"""Tracks the status of all requests."""
Expand Down

0 comments on commit 7d9cff3

Please sign in to comment.