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

Embed image and audio files in save_to_disk #4196

Closed
lhoestq opened this issue Apr 21, 2022 · 0 comments · Fixed by #5268
Closed

Embed image and audio files in save_to_disk #4196

lhoestq opened this issue Apr 21, 2022 · 0 comments · Fixed by #5268

Comments

@lhoestq
Copy link
Member

lhoestq commented Apr 21, 2022

Following #4184, currently a dataset saved using save_to_disk doesn't actually contain the bytes of the image or audio files. Instead it stores the path to your local files.

Adding embed_external_files and set it to True by default to save_to_disk would be kind of a breaking change since some users will get bigger Arrow files when updating the lib, but the advantages are nice:

  • the resulting dataset is self contained, in case you want to delete your cache for example or share it with someone else
  • users also upload these Arrow files to cloud storage via the fs parameter, and in this case they would expect to upload a self-contained dataset
  • consistency with push_to_hub

This can be implemented at the same time as sharding for save_to_disk for efficiency, and reuse the helpers from push_to_hub to embed the external files.

cc @mariosasko

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 a pull request may close this issue.

1 participant