Skip to content
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

Refactor fetching #669

Open
wants to merge 19 commits into
base: main
Choose a base branch
from

Conversation

LilianBoulard
Copy link
Member

@LilianBoulard LilianBoulard commented Jul 20, 2023

The goal of this PR is to refactor the fetching system to:

  • Rely on the sklearn cache implementation of fetch_openml, which makes a lot of our code outdated
  • Simplify the private API
  • Separate the public from the private API, since the file is about 1K lines long, making it hard to work with
  • Simplify the Dataset API, so that we don't return different objects depending on the value of load_dataframe
  • Align with the API of sklearn's fetchers

@LilianBoulard LilianBoulard added the enhancement New feature or request label Jul 20, 2023
@LilianBoulard LilianBoulard self-assigned this Jul 20, 2023
@LilianBoulard LilianBoulard marked this pull request as draft July 20, 2023 16:56
…tor_fetching

# Conflicts:
#	benchmarks/utils/_various.py
#	skrub/datasets/__init__.py
@GaelVaroquaux
Copy link
Member

Hold your horses :)

We have too many things happening right now to undertake a refactor. Let's wait a few days to merge a few things and have less ongoing modifications in the code base.

@GaelVaroquaux
Copy link
Member

GaelVaroquaux commented Aug 3, 2023 via email

@LilianBoulard
Copy link
Member Author

LilianBoulard commented Aug 3, 2023

From my quick analysis of the test error, it seems there is a difference somewhere in fetch_world_bank_indicator, which causes the indices of the two tables to mismatch. However, doing self.X.reset_index(drop=True).equals(other.X.reset_index(drop=True)) in Dataset.__eq__ doesn't work either, and I don't know why yet.

Edit: it was a dtype mismatch, thanks @Vincent-Maladiere

@LilianBoulard LilianBoulard marked this pull request as ready for review August 3, 2023 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants