mirror of
https://github.com/datalab-to/chandra.git
synced 2025-11-29 08:33:13 +00:00
Add a small sleep
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import base64
|
||||
import io
|
||||
import time
|
||||
from concurrent.futures import ThreadPoolExecutor
|
||||
from itertools import repeat
|
||||
from typing import List
|
||||
@@ -112,6 +113,7 @@ def generate_vllm(
|
||||
print(
|
||||
f"Detected vllm error, retrying generation (attempt {retries + 1})..."
|
||||
)
|
||||
time.sleep(2 * (retries + 1)) # Sleeping can help under load
|
||||
return True
|
||||
|
||||
if (
|
||||
@@ -122,6 +124,7 @@ def generate_vllm(
|
||||
print(
|
||||
f"Detected vllm error, retrying generation (attempt {retries + 1})..."
|
||||
)
|
||||
time.sleep(2 * (retries + 1)) # Sleeping can help under load
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user