e56644df454cc482d19cfe7db56b9bad3b3024fc,test/data/test_builtin_datasets.py,TestDataset,test_imdb,#TestDataset#,106

Before Change


                         torch.tensor([2, 71, 4555, 194, 3328, 15144, 42, 227, 148, 8]).long())
        self.assertEqual(test_dataset[0][1][:10],
                         torch.tensor([13, 125, 1051, 5, 246, 1652, 8, 277, 66, 20]).long())
        self.assertEqual(test_dataset[-1][1][:10],
                         torch.tensor([13, 1035, 14, 21, 28, 2, 1051, 1275, 1008, 3]).long())

        // Test API with a vocab input object
        old_vocab = train_dataset.get_vocab()
        new_vocab = Vocab(counter=old_vocab.freqs, max_size=2500)

After Change


        self._helper_test_func(len(train_dataset), 25000, train_dataset[0][1][:10],
                               [13, 1568, 13, 246, 35468, 43, 64, 398, 1135, 92])
        train_iter, = torchtext.experimental.datasets.raw.IMDB(data_select=("train"))
        self._helper_test_func(len(train_iter), 25000, next(iter(train_iter))[1][:25], "I rented I AM CURIOUS-YEL")
        del train_dataset, test_dataset

    def test_multi30k(self):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


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_imdb


Project Name: reinforceio/tensorforce
Commit Name: 10f9ea5b21518d3b322016e7226db8a2608a3e58
Time: 2018-01-27
Author: aok25@cl.cam.ac.uk
File Name: tensorforce/models/model.py
Class Name: Model
Method Name: get_feed_dict


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