Skip to content

Commit 3c63768

Browse files
committed
Increased the timeout
Signed-off-by: Rishin Raj <[email protected]>
1 parent c2e6540 commit 3c63768

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

QEfficient/utils/device_utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def ensure_lock_dir(lock_dir: str):
5353
os.makedirs(lock_dir)
5454

5555

56-
def acquire_device_lock(retry_interval: int = 10, retry_duration: int = 300) -> Optional[object]:
56+
def acquire_device_lock(retry_interval: int = 10, retry_duration: int = 600) -> Optional[object]:
5757
"""
5858
Attempt to acquire a non-blocking exclusive lock on a device lock file.
5959
Retries every 10 seconds for up to 5 minutes.
@@ -85,7 +85,7 @@ def acquire_device_lock(retry_interval: int = 10, retry_duration: int = 300) ->
8585
logger.error(f"Unexpected error acquiring lock for device check: {e}")
8686
return None
8787

88-
logger.warning("Failed to acquire lock for device check after 5 minutes.")
88+
logger.warning(f"Failed to acquire lock for device check after {retry_duration//60} minutes.")
8989
return None
9090

9191

@@ -116,7 +116,7 @@ def __fetch_device_id(device_count):
116116
return None
117117

118118

119-
def get_available_device_id(retry_duration: int = 300, wait_time: int = 5) -> Optional[list[int]]:
119+
def get_available_device_id(retry_duration: int = 600, wait_time: int = 5) -> Optional[list[int]]:
120120
"""
121121
Find an available Cloud AI 100 device ID using file-based locking.
122122

0 commit comments

Comments
 (0)