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

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

Merged
merged 2 commits into from
Dec 15, 2020
Merged

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

merged 2 commits into from
Dec 15, 2020

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
guyrosin pushed a commit to guyrosin/transformers that referenced this pull request Jan 15, 2021
…les (huggingface#9133)

* replaced jnp.split + removing textual model inputs + ensuring warmup_steps > 0

* Add automatic dataset splitting in language-modeling examples
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.

None yet

3 participants