Skip to content

Conversation

@PGijsbers
Copy link
Collaborator

@PGijsbers PGijsbers commented Oct 24, 2021

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.

Note that while in the code diff the change might seem ineffectual, the function was also called unprotected from dataset.py#306, which is what caused the issue in #1116.

Fixes #1116

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.
Copy link
Collaborator

@mfeurer mfeurer left a comment

Choose a reason for hiding this comment

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

I'm not sure if I understand the changes correctly. Moving the MaxRetryError is just to have all error handling in one place, right? So effectively, this PR adds a log message?

@PGijsbers
Copy link
Collaborator Author

And because error handling is now in one place, this call which was previously unguarded becomes guarded too. This previous asymmetry (catching it in one place but not the other) lead to the odd different behavior described in #1116 where:

dataset = openml.datasets.get_dataset(554, download_data=False)
X, y, is_categorical, _ = dataset.get_data(
    dataset_format="array", target=dataset.default_target_attribute
)

gave an error but

dataset = openml.datasets.get_dataset(554)
X, y, is_categorical, _ = dataset.get_data(
    dataset_format="array", target=dataset.default_target_attribute
)

did not.

Copy link
Collaborator

@mfeurer mfeurer left a comment

Choose a reason for hiding this comment

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

Ah, I didn't see that other call, sorry.

@PGijsbers PGijsbers merged commit a6c0576 into develop Oct 27, 2021
@PGijsbers PGijsbers deleted the fix/1116 branch October 27, 2021 13:11
PGijsbers added a commit to Mirkazemi/openml-python that referenced this pull request Feb 23, 2023
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix MaxRetryError when loading MNIST & Fashion-MNIST

3 participants