Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions benchmark/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,20 @@ def download(self):

if self.config.link:
print(f"Downloading {self.config.link}...")
tmp_path, _ = urllib.request.urlretrieve(
self.config.link, None, show_progress
)

remaining_download_tries = 15
while remaining_download_tries > 0 :
try:
tmp_path, _ = urllib.request.urlretrieve(
self.config.link, None, show_progress
)
print(f"Download succeded.")
except:
print(f"Download failed. Retrying...")
remaining_download_tries = remaining_download_tries - 1
continue
else:
break

if self.config.link.endswith(".tgz") or self.config.link.endswith(
".tar.gz"
Expand Down