akseljoonas HF Staff commited on
Commit
e2b91f0
·
1 Parent(s): 67f8ace

jobs tool timeout errors;

Browse files
Files changed (1) hide show
  1. agent/tools/jobs_tool.py +5 -0
agent/tools/jobs_tool.py CHANGED
@@ -11,6 +11,7 @@ import os
11
  import re
12
  from typing import Any, Dict, Literal, Optional
13
 
 
14
  from huggingface_hub import HfApi
15
  from huggingface_hub.utils import HfHubHTTPError
16
 
@@ -373,7 +374,11 @@ class HfJobsTool:
373
  except (
374
  ConnectionError,
375
  TimeoutError,
 
376
  http.client.IncompleteRead,
 
 
 
377
  ) as e:
378
  # Connection dropped - check if job is still running
379
  try:
 
11
  import re
12
  from typing import Any, Dict, Literal, Optional
13
 
14
+ import httpx
15
  from huggingface_hub import HfApi
16
  from huggingface_hub.utils import HfHubHTTPError
17
 
 
374
  except (
375
  ConnectionError,
376
  TimeoutError,
377
+ OSError,
378
  http.client.IncompleteRead,
379
+ httpx.RemoteProtocolError,
380
+ httpx.ReadError,
381
+ HfHubHTTPError,
382
  ) as e:
383
  # Connection dropped - check if job is still running
384
  try: