2d77a2d6039bc444f2a5801f0c4624cd140c3a23,tests/data/iterators/adaptive_iterator_test.py,TestAdaptiveIterator,test_biggest_batch_first_passes_off_to_bucket_iterator,#TestAdaptiveIterator#,33

Before Change


                                    sorting_keys=[("text", "num_tokens")],
                                    biggest_batch_first=True,
                                    batch_size=2)
        grouped_instances = iterator._create_batches(self.dataset, shuffle=False)
        assert grouped_instances == [[self.instances[3]],
                                     [self.instances[0], self.instances[1]],
                                     [self.instances[4], self.instances[2]]]

After Change


                                    sorting_keys=[("text", "num_tokens")],
                                    biggest_batch_first=True,
                                    batch_size=2)
        batches = list(iterator._create_batches(self.dataset, shuffle=False))
        grouped_instances = [batch.instances for batch in batches]
        assert grouped_instances == [[self.instances[3]],
                                     [self.instances[0], self.instances[1]],
                                     [self.instances[4], self.instances[2]]]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 6

Non-data size: 8

Instances


Project Name: allenai/allennlp
Commit Name: 2d77a2d6039bc444f2a5801f0c4624cd140c3a23
Time: 2018-01-16
Author: joelgrus@gmail.com
File Name: tests/data/iterators/adaptive_iterator_test.py
Class Name: TestAdaptiveIterator
Method Name: test_biggest_batch_first_passes_off_to_bucket_iterator


Project Name: allenai/allennlp
Commit Name: 2d77a2d6039bc444f2a5801f0c4624cd140c3a23
Time: 2018-01-16
Author: joelgrus@gmail.com
File Name: tests/data/iterators/adaptive_iterator_test.py
Class Name: TestAdaptiveIterator
Method Name: test_create_batches_groups_correctly


Project Name: allenai/allennlp
Commit Name: 2d77a2d6039bc444f2a5801f0c4624cd140c3a23
Time: 2018-01-16
Author: joelgrus@gmail.com
File Name: tests/data/iterators/bucket_iterator_test.py
Class Name: TestBucketIterator
Method Name: test_biggest_batch_first_works


Project Name: allenai/allennlp
Commit Name: 2d77a2d6039bc444f2a5801f0c4624cd140c3a23
Time: 2018-01-16
Author: joelgrus@gmail.com
File Name: tests/data/iterators/bucket_iterator_test.py
Class Name: TestBucketIterator
Method Name: test_create_batches_groups_correctly


Project Name: allenai/allennlp
Commit Name: 2d77a2d6039bc444f2a5801f0c4624cd140c3a23
Time: 2018-01-16
Author: joelgrus@gmail.com
File Name: tests/data/iterators/basic_iterator_test.py
Class Name: TestBasicIterator
Method Name: test_create_batches_groups_correctly


Project Name: allenai/allennlp
Commit Name: 2d77a2d6039bc444f2a5801f0c4624cd140c3a23
Time: 2018-01-16
Author: joelgrus@gmail.com
File Name: tests/data/iterators/adaptive_iterator_test.py
Class Name: TestAdaptiveIterator
Method Name: test_create_batches_respects_maximum_batch_size