Skip to content

Commit

Permalink
handle connection error in download_prepared_from_hf_gcs (huggingface…
Browse files Browse the repository at this point in the history
  • Loading branch information
lhoestq authored Sep 21, 2020
1 parent 07839de commit 8c67b80
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/datasets/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,6 +464,8 @@ def incomplete_dir(dirname):
downloaded_from_gcs = True
except (DatasetNotOnHfGcs, MissingFilesOnHfGcs):
logger.info("Dataset not on Hf google storage. Downloading and preparing it from source")
except ConnectionError:
logger.warning("HF google storage unreachable. Downloading and preparing it from source")
if not downloaded_from_gcs:
self._download_and_prepare(
dl_manager=dl_manager, verify_infos=verify_infos, **download_and_prepare_kwargs
Expand Down

0 comments on commit 8c67b80

Please sign in to comment.