Thanks to visit codestin.com
Credit goes to github.com

Skip to content

MAINT use properly the metadata from OpenML #29411

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

Closed

Conversation

glemaitre
Copy link
Member

This PR improve the code in _openml.py to use the json file from OpenML. In this case, it helps at transitioning from ARFF file to parquet file. It also makes it easier for transitioning from v1 API to the future v2.

@glemaitre glemaitre marked this pull request as draft July 4, 2024 08:18
Copy link

github-actions bot commented Jul 4, 2024

✔️ Linting Passed

All linting checks passed. Your pull request is in excellent shape! ☀️

Generated for commit: 3d78d44. Link to the linter CI: here

Copy link
Member

@ogrisel ogrisel left a comment

Choose a reason for hiding this comment

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

Some early feedback. Feel free to ping me when the PR is ready for review.

Comment on lines +126 to +127
OpenML URL that will be accessed. We parse the URL to get the path and
replicate the tree structure on the local cache.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
OpenML URL that will be accessed. We parse the URL to get the path and
replicate the tree structure on the local cache.
URL of an OpenML file to be downloaded and cached locally. The path component
of the URL is used to replicate the tree structure as sub-folders of the local
cache folder.

@@ -156,6 +155,7 @@ def is_gzip_encoded(_fsrc):
return gzip.GzipFile(fileobj=fsrc, mode="rb")
return fsrc

openml_path = urlparse(url).path[1:] # remove leading slash
Copy link
Member

Choose a reason for hiding this comment

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

Safer and more explicit this way:

Suggested change
openml_path = urlparse(url).path[1:] # remove leading slash
openml_path = urlparse(url).path.lstrip("/") # remove the leading slash

@lesteve
Copy link
Member

lesteve commented Jan 24, 2025

Superseded by #30708

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants