[Misc] Tiny: Add test network timeouts and dynamic max-parallel for 5090/2-gpu runners (#21800)
This commit is contained in:
@@ -516,7 +516,7 @@ def make_report_from_example_htmls(htmls: List[str]):
|
||||
def download_dataset(path, url):
|
||||
print(f"Downloading dataset {path} from {url}")
|
||||
try:
|
||||
response = requests.get(url, stream=True)
|
||||
response = requests.get(url, stream=True, timeout=120)
|
||||
response.raise_for_status()
|
||||
|
||||
total_size = int(response.headers.get("content-length", 0))
|
||||
|
||||
@@ -115,7 +115,7 @@ def score_mgsm(target: str, prediction: str) -> bool:
|
||||
def get_lang_examples(lang: str) -> list[dict[str, str]]:
|
||||
fpath = LANG_TO_FPATH[lang]
|
||||
examples = []
|
||||
with urllib.request.urlopen(fpath) as f:
|
||||
with urllib.request.urlopen(fpath, timeout=30) as f:
|
||||
for line in f.read().decode("utf-8").splitlines():
|
||||
inputs, targets = line.strip().split("\t")
|
||||
if "." in targets:
|
||||
|
||||
@@ -77,7 +77,7 @@ class TestOpenAIMLLMServerBase(CustomTestCase):
|
||||
os.makedirs(cache_dir, exist_ok=True)
|
||||
|
||||
if not os.path.exists(file_path):
|
||||
response = requests.get(url)
|
||||
response = requests.get(url, timeout=30)
|
||||
response.raise_for_status()
|
||||
|
||||
with open(file_path, "wb") as f:
|
||||
|
||||
Reference in New Issue
Block a user