-
Notifications
You must be signed in to change notification settings - Fork 3k
Support downloading specific splits in load_dataset
#7858
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
base: main
Are you sure you want to change the base?
Support downloading specific splits in load_dataset
#7858
Conversation
…lit-download-support
lhoestq
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great ! Will try to review this asap :)
@ArjunJagdale you should check this out
|
@CloseChoice This looks great! You're absolutely right about the missing comparison - that's a critical bug I missed. |
|
@lhoestq just resolved the conflicts inflicted by the latest changes. Thought it might be good giving this a shot now before more changes mess with this PR. |
This is PR builds on top of #7706 to revive the unfinished #6832 but isn't just cleaning up things, here are some important changes:
download_mode="FORCE_REDOWNLOAD"is interpreted as always creating a clean slate, that means that even if we already did:This makes sure that only the train dataset is available after executing both. This was different in the original PR, which proposed that train and test would be available.
download_mode="REUSE_DATASET_IF_EXISTS"is interpreted as only ever adding new data, never redownloading OR deleting other splits. This was different in the original PR, whereresulted in only the train data being available, which I deem very unintuitive and probably not what users want. Also I argue that this is just the first step to a more user friendly partial loading when specifying percentages (or maybe even single instances) via the ReadInstructions, and then doing
should result IMO in the whole dataset being cached locally without redownloads.
Furthermore this PR fixes a couple issues with the previous PR, e.g. a missing comparison and adding tests for the proposed changes in behaviour, which would both fail on @ArjunJagdale's original PR.
Todo:
Future outlook (just my opinions and up for debate):
As mentioned before, I would see this as just a step towards the feature of partial percentage loading (though how the API should behave in that case is not entirely clear for me now) and maybe we could introduce another
download_mode="FORCE_REDOWNLOAD_SPLIT", which makes sure that even if a split is specified, only the referenced split is redownloaded and everything else left unchanged, this would then allow users more granular control over what they want to redownload.@lhoestq very curious to get your opinion on this.