Skip to content

[Examples] Add automatic dataset splitting in language-modeling examples#9133

Merged
LysandreJik merged 2 commits intohuggingface:masterfrom
TevenLeScao:lm-examples-dataset-splitting
Dec 15, 2020
Merged

[Examples] Add automatic dataset splitting in language-modeling examples#9133
LysandreJik merged 2 commits intohuggingface:masterfrom
TevenLeScao:lm-examples-dataset-splitting

Conversation

@TevenLeScao
Copy link
Contributor

What does this PR do?

Currently, language-modeling examples support passing a HF-datasets dataset as training data. However, this dataset needs to have a train and validation split, which is not the case for many language-modeling datasets, which are just unstructured text. The updated scripts automatically partition the train split to create a validation split if it doesn't exist already, and adds validation_split_percentage argument to control the split ratio, set to 5% by default.

@TevenLeScao
Copy link
Contributor Author

Ah, the commit from #9127 seems to have snuck its way in there. Should I remove it?

@sgugger
Copy link
Collaborator

sgugger commented Dec 15, 2020

If you can do it easily, that would be best!

Copy link
Collaborator

@sgugger sgugger left a comment

Choose a reason for hiding this comment

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

Looking good to me, thanks!

@TevenLeScao
Copy link
Contributor Author

If you can do it easily, that would be best!

I've tried for a bit but I think I just made things worse ! If that's OK I'll leave it there and I'll fix things at merge time.

Copy link
Member

@LysandreJik LysandreJik left a comment

Choose a reason for hiding this comment

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

Great, LGTM!

@LysandreJik LysandreJik merged commit 2a7e8e1 into huggingface:master Dec 15, 2020
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.

3 participants