Skip to content
Merged
Show file tree
Hide file tree
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
5 changes: 5 additions & 0 deletions doc/progress.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@
Changelog
=========

0.14.1
~~~~~~

* FIX: Fallback on downloading ARFF when failing to download parquet from MinIO due to a ServerError.

0.14.0
~~~~~~

Expand Down
5 changes: 4 additions & 1 deletion openml/datasets/functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from typing import List, Dict, Optional, Union, cast
import warnings

import minio.error
import numpy as np
import arff
import pandas as pd
Expand Down Expand Up @@ -499,6 +500,8 @@ def get_dataset(
)
except urllib3.exceptions.MaxRetryError:
parquet_file = None
if parquet_file is None and arff_file:
logger.warning("Failed to download parquet, fallback on ARFF.")
else:
parquet_file = None
remove_dataset_cache = False
Expand Down Expand Up @@ -1095,7 +1098,7 @@ def _get_dataset_parquet(
openml._api_calls._download_minio_file(
source=cast(str, url), destination=output_file_path
)
except (FileNotFoundError, urllib3.exceptions.MaxRetryError) as e:
except (FileNotFoundError, urllib3.exceptions.MaxRetryError, minio.error.ServerError) as e:
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could opt to catch all exceptions here instead. It would "future proof" in case new kinds of errors are raised, though generally it is useful to know what the errors are early and evaluate if different mitigation strategies are appropriate.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree that we should make sure to see new error messages.

logger.warning("Could not download file from %s: %s" % (cast(str, url), e))
return None
return output_file_path
Expand Down