-
-
Notifications
You must be signed in to change notification settings - Fork 212
Allow fallback to ARFF on ServerError and make explicit in warning #1272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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 | ||
|
|
@@ -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 | ||
|
|
@@ -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: | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.