From 9fd48cf08e4f6ee90d68ee2d7d416bf1542c336a Mon Sep 17 00:00:00 2001
From: Ryan Marten <ryanmarten2000@gmail.com>
Date: Mon, 16 Dec 2024 13:09:21 -0800
Subject: [PATCH] change logs

---
 .../request_processor/base_online_request_processor.py       | 5 +++--
 .../request_processor/litellm_online_request_processor.py    | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

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(