Skip to content

Commit

Permalink
update var
Browse files Browse the repository at this point in the history
  • Loading branch information
huiwengoh authored Oct 10, 2024
1 parent bcd89be commit 3261762
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cleanlab_studio/internal/api/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 3261762

Please sign in to comment.