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

Move the new language modeling datasets to torchtext.experimental.datasets #661

Merged
merged 5 commits into from
Dec 4, 2019

Conversation

zhangguanheng66
Copy link
Contributor

@zhangguanheng66 zhangguanheng66 commented Dec 4, 2019

Move the legacy language modeling datasets back to the "main" folder. No BC breaking for 0.5.0 release. The new language modeling datasets (#624) are now available in torchtext.experimental.datasets.

To use the new datasets:

from torchtext.experimental.datasets import WikiText2
train_dataset, test_dataset, valid_dataset = WikiText2()

To use the old datasets:

import torchtext.data as data
from torchtext.datasets import WikiText2
TEXT = data.Field()
train_dataset, valid_dataset, test_dataset = WikiText2.splits(TEXT)

Copy link
Contributor

@cpuhrsch cpuhrsch left a comment

Choose a reason for hiding this comment

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

LGTM!

@cpuhrsch cpuhrsch merged commit c04636c into pytorch:master Dec 4, 2019
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

2 participants