From 32617627f2fe341b98cf49e040e04750932e23cb Mon Sep 17 00:00:00 2001 From: Hui Wen <45724323+huiwengoh@users.noreply.github.com> Date: Thu, 10 Oct 2024 14:44:21 -0400 Subject: [PATCH] update var --- cleanlab_studio/internal/api/api.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cleanlab_studio/internal/api/api.py b/cleanlab_studio/internal/api/api.py index 6dbc4f39..9052b39c 100644 --- a/cleanlab_studio/internal/api/api.py +++ b/cleanlab_studio/internal/api/api.py @@ -934,7 +934,7 @@ async def wrapper(*args: Any, **kwargs: Any) -> Any: except aiohttp.client_exceptions.ClientConnectorError as e: if num_connection_error_retry == (max_connection_error_retries // 2): warnings.warn( - f"Connection error after {max_connection_error_retries // 2} retries. Retrying..." + f"Connection error after {num_connection_error_retry} retries. Retrying..." ) sleep_time = min(2**num_connection_error_retry, 60) # note: we have a different counter for connection errors, because we want to retry connection errors more times @@ -953,12 +953,12 @@ async def wrapper(*args: Any, **kwargs: Any) -> Any: if num_connection_error_retry > max_connection_error_retries: raise APIError( - f"Connection error after {max_connection_error_retries + 1} retries. {error_message}", + f"Connection error after {num_connection_error_retry} retries. {error_message}", -1, ) else: raise APIError( - f"TLM failed after {max_general_retries + 1} attempts. {error_message}", -1 + f"TLM failed after {num_general_retry} attempts. {error_message}", -1 ) return wrapper