Skip to content

Commit a6c0576

Browse files
authored
Always ignore MaxRetryError but log with warning (openml#1119)
Currently parquet files are completely optional, so under no circumstance should the inability to download it raise an error to the user. Instead we log a warning and proceed without the parquet file.
1 parent 2984403 commit a6c0576

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

openml/datasets/functions.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -428,10 +428,7 @@ def get_dataset(
428428

429429
arff_file = _get_dataset_arff(description) if download_data else None
430430
if "oml:minio_url" in description and download_data:
431-
try:
432-
parquet_file = _get_dataset_parquet(description)
433-
except urllib3.exceptions.MaxRetryError:
434-
parquet_file = None
431+
parquet_file = _get_dataset_parquet(description)
435432
else:
436433
parquet_file = None
437434
remove_dataset_cache = False
@@ -1003,7 +1000,8 @@ def _get_dataset_parquet(
10031000
openml._api_calls._download_minio_file(
10041001
source=cast(str, url), destination=output_file_path
10051002
)
1006-
except FileNotFoundError:
1003+
except (FileNotFoundError, urllib3.exceptions.MaxRetryError) as e:
1004+
logger.warning("Could not download file from %s: %s" % (cast(str, url), e))
10071005
return None
10081006
return output_file_path
10091007

0 commit comments

Comments
 (0)