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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support PathLike input in save_to_disk / load_from_disk #6828

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

lhoestq
Copy link
Member

@lhoestq lhoestq commented Apr 23, 2024

No description provided.

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@albertvillanova albertvillanova linked an issue Apr 23, 2024 that may be closed by this pull request
Copy link
Member

@albertvillanova albertvillanova left a comment

Choose a reason for hiding this comment

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

Thanks you.

Do you think it would be worth adding a test?

@@ -1449,7 +1450,7 @@ def save_to_disk(
If you want to store paths or urls, please use the Value("string") type.

Args:
dataset_path (`str`):
dataset_path (`PathLike`):
Copy link
Member

Choose a reason for hiding this comment

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

Great, so now this is aligned with the type hint: dataset_path: PathLike

Copy link
Member Author

Choose a reason for hiding this comment

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

yes we should have one imo before merging

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.

Load and save from/to disk no longer accept pathlib.Path
3 participants