88e55d70bc603bf54f5d2c64cfb9a0706bafaead,test/data/test_builtin_datasets.py,TestDataset,test_wikitext2,#TestDataset#,46
Before Change
self.assertEqual(tokens_ids, [2, 286, 503, 700])
// Add test for the subset of the standard datasets
train_dataset , test_dataset = torchtext.experimental.datasets.raw.WikiText2(data_select=("train", "test"))
self._helper_test_func(len(train_dataset), 36718, next(iter(train_dataset)), " \n")
self._helper_test_func(len(test_dataset), 36718, next(iter(test_dataset)), " \n")
del train_dataset, test_dataset
After Change
train_iter, valid_iter, test_iter = torchtext.experimental.datasets.raw.WikiText2(data_select=("train", "valid", "test"))
self._helper_test_func(len(train_iter), 36718, next(iter(train_iter)), " \n")
self._helper_test_func(len(valid_iter), 3760, next(iter(valid_iter)), " \n")
self._helper_test_func(len(test_iter), 4358, next(iter(test_iter)), " \n")
del train_iter, valid_iter, test_iter
train_dataset, test_dataset = WikiText2(data_select=("train", "test"))
self._helper_test_func(len(train_dataset), 2049990, train_dataset[20:25],
[5024, 89, 21, 3, 1838])
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances Project Name: pytorch/text
Commit Name: 88e55d70bc603bf54f5d2c64cfb9a0706bafaead
Time: 2020-11-07
Author: 6156351+zhangguanheng66@users.noreply.github.com
File Name: test/data/test_builtin_datasets.py
Class Name: TestDataset
Method Name: test_wikitext2
Project Name: pytorch/text
Commit Name: e56644df454cc482d19cfe7db56b9bad3b3024fc
Time: 2020-10-12
Author: 6156351+zhangguanheng66@users.noreply.github.com
File Name: test/data/test_builtin_datasets.py
Class Name: TestDataset
Method Name: test_text_classification
Project Name: pytorch/text
Commit Name: 88e55d70bc603bf54f5d2c64cfb9a0706bafaead
Time: 2020-11-07
Author: 6156351+zhangguanheng66@users.noreply.github.com
File Name: test/data/test_builtin_datasets.py
Class Name: TestDataset
Method Name: test_multi30k