diff --git a/src/bespokelabs/curator/status_tracker/online_status_tracker.py b/src/bespokelabs/curator/status_tracker/online_status_tracker.py index c5e2c229..2227181e 100644 --- a/src/bespokelabs/curator/status_tracker/online_status_tracker.py +++ b/src/bespokelabs/curator/status_tracker/online_status_tracker.py @@ -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: @@ -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 (