3b3f8bd00c463e441600673141ff2de608880c9a,deeppavlov/datasets/dialog_dataset.py,DialogDataset,batch_generator,#DialogDataset#Any#Any#Any#,58

Before Change


        if shuffle:
            random.shuffle(order)
        for i in range((num_dialogs - 1) // batch_size + 1):
            print("Getting dialogs =", [dialog_indices[o] for o in
                                        order[i*batch_size:(i+1)*batch_size]])
            yield list(itertools.chain.from_iterable(
                _dialog(dialog_indices[o])\
                for o in order[i*batch_size:(i+1)*batch_size]))

After Change


            self.random_state = random.getstate()
            random.setstate(rs)
        for i in order:
            for x, y in dialogs[i]:
                yield [x], [y]

    @staticmethod
    def _dialogs(data):
        dialogs = []
        for x, y in data:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: deepmipt/DeepPavlov
Commit Name: 3b3f8bd00c463e441600673141ff2de608880c9a
Time: 2018-02-05
Author: yoptar@gmail.com
File Name: deeppavlov/datasets/dialog_dataset.py
Class Name: DialogDataset
Method Name: batch_generator


Project Name: PetrochukM/PyTorch-NLP
Commit Name: dd2eaf6c174fdd757514bc06d1063e5f9c6bb4a0
Time: 2019-10-20
Author: petrochukm@gmail.com
File Name: torchnlp/samplers/bucket_batch_sampler.py
Class Name: BucketBatchSampler
Method Name: __iter__


Project Name: OpenNMT/OpenNMT-py
Commit Name: 594f66417cf0a2abaead1ce6e5f15a2100441682
Time: 2017-09-21
Author: srush@seas.harvard.edu
File Name: onmt/IO.py
Class Name: ONMTDataset
Method Name: _read_corpus_file