yonikremer commited on
Commit
2101135
1 Parent(s): 3c26373

increased timeout

Browse files
Files changed (1) hide show
  1. download_repo.py +3 -3
download_repo.py CHANGED
@@ -18,11 +18,11 @@ def download_pytorch_model(name: str) -> None:
18
  Downloads a pytorch model and all the small files from the model's repository.
19
  Other model formats (tensorflow, tflite, safetensors, msgpack, ot...) are not downloaded.
20
  """
21
- number_of_seconds_in_a_day: int = 86_400
22
- change_default_timeout(number_of_seconds_in_a_day)
23
  snapshot_download(
24
  repo_id=name,
25
- etag_timeout=number_of_seconds_in_a_day,
26
  resume_download=True,
27
  repo_type="model",
28
  library_name="pt",
 
18
  Downloads a pytorch model and all the small files from the model's repository.
19
  Other model formats (tensorflow, tflite, safetensors, msgpack, ot...) are not downloaded.
20
  """
21
+ number_of_seconds_in_a_year: int = 60 * 60 * 24 * 365
22
+ change_default_timeout(number_of_seconds_in_a_year)
23
  snapshot_download(
24
  repo_id=name,
25
+ etag_timeout=number_of_seconds_in_a_year,
26
  resume_download=True,
27
  repo_type="model",
28
  library_name="pt",