Skip to content

Commit

Permalink
[util] Increase persistence on "Too many Requests" errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisCummins committed Sep 29, 2021
1 parent 8c66b24 commit f8ba6f7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions compiler_gym/util/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def _download(urls: List[str], sha256: Optional[str], max_retries: int) -> bytes

# A retry loop, and loop over all urls provided.
last_exception = None
wait_time = 5
wait_time = 10
for _ in range(max(max_retries, 1)):
for url in urls:
try:
Expand All @@ -99,7 +99,7 @@ def _download(urls: List[str], sha256: Optional[str], max_retries: int) -> bytes


def download(
urls: Union[str, List[str]], sha256: Optional[str] = None, max_retries: int = 3
urls: Union[str, List[str]], sha256: Optional[str] = None, max_retries: int = 5
) -> bytes:
"""Download a file and return its contents.
Expand Down

0 comments on commit f8ba6f7

Please sign in to comment.