diff --git a/src/bespokelabs/curator/request_processor/base_online_request_processor.py b/src/bespokelabs/curator/request_processor/base_online_request_processor.py index 35913cee..1aee4682 100644 --- a/src/bespokelabs/curator/request_processor/base_online_request_processor.py +++ b/src/bespokelabs/curator/request_processor/base_online_request_processor.py @@ -486,8 +486,9 @@ async def handle_single_request_with_retries( if request.attempts_left > 0: request.attempts_left -= 1 logger.warning( - f"Request {request.task_id} failed with Exception: {e} " - f"Retries left: {request.attempts_left}" + f"Encountered '{e.__class__.__name__}: {e}' during attempt " + f"{self.max_retries - request.attempts_left} of {self.max_retries} " + f"while processing request {request.task_id}" ) retry_queue.put_nowait(request) else: diff --git a/src/bespokelabs/curator/request_processor/litellm_online_request_processor.py b/src/bespokelabs/curator/request_processor/litellm_online_request_processor.py index f34113b6..86bfef8a 100644 --- a/src/bespokelabs/curator/request_processor/litellm_online_request_processor.py +++ b/src/bespokelabs/curator/request_processor/litellm_online_request_processor.py @@ -306,7 +306,7 @@ async def call_single_request( logger.debug( f"finish_reason {finish_reason} was not 'stop' with raw response {completion_obj.model_dump()} for request {request.generic_request.messages}" ) - raise ValueError(f"finish_reason was {finish_reason} ") + raise ValueError(f"finish_reason was {finish_reason}") if response_message is None: raise ValueError(