Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanMarten committed Dec 18, 2024
1 parent be55ca0 commit 4d4c7a5
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/bespokelabs/curator/status_tracker/online_status_tracker.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import logging
import time
from dataclasses import dataclass, field

import tqdm

logger = logging.getLogger(__name__)
from dataclasses import dataclass, field
from bespokelabs.curator.request_processor.base_online_request_processor import SECONDS_TO_PAUSE_ON_RATE_LIMIT

logger = logging.getLogger(__name__)

@dataclass
class OnlineStatusTracker:
Expand All @@ -26,7 +26,9 @@ class OnlineStatusTracker:
max_tokens_per_minute: int = 0
pbar: tqdm = field(default=None)
response_cost: float = 0
time_of_last_rate_limit_error: float = field(default=None)
time_of_last_rate_limit_error: float = field(
default=time.time() - SECONDS_TO_PAUSE_ON_RATE_LIMIT
)

def __str__(self):
return (
Expand Down

0 comments on commit 4d4c7a5

Please sign in to comment.