f57c6162ea1dd0d9958d647a67e717f1de9caace,petastorm/tests/test_end_to_end.py,,test_partition_multi_node,#Any#Any#,208

Before Change



            // Since order is non deterministic, we need to sort results by id
            results_1.sort(key=lambda x: x["id"])
            results_2.sort(key=lambda x: x["id"])
            expected.sort(key=lambda x: x["id"])

            np.testing.assert_equal(expected, results_1)
            np.testing.assert_equal(results_1, results_2)

After Change


    with reader_factory(synthetic_dataset.url, cur_shard=0, shard_count=5) as reader:
        with reader_factory(synthetic_dataset.url, cur_shard=0, shard_count=5) as reader_2:
            results_1 = set(_readout_all_ids(reader))
            results_2 = set(_readout_all_ids(reader_2))

            assert results_1, "Non empty shard expected"

            np.testing.assert_equal(results_1, results_2)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 6

Non-data size: 3

Instances


Project Name: uber/petastorm
Commit Name: f57c6162ea1dd0d9958d647a67e717f1de9caace
Time: 2018-12-09
Author: yevgeni@uber.com
File Name: petastorm/tests/test_end_to_end.py
Class Name:
Method Name: test_partition_multi_node


Project Name: allenai/allennlp
Commit Name: c59a3a8b645e77cf134cee33f4f08841585bf046
Time: 2019-05-16
Author: guoquanscu@gmail.com
File Name: allennlp/training/metrics/auc.py
Class Name: Auc
Method Name: __call__


Project Name: nilmtk/nilmtk
Commit Name: f74a4a251d395b3e175f99845b01ece0e50a79c3
Time: 2014-08-24
Author: nipunreddevil@gmail.com
File Name: nilmtk/metergroup.py
Class Name: MeterGroup
Method Name: select_top_k


Project Name: elbayadm/attn2d
Commit Name: 8eb232ce150d1afb44880a7078eb4abbae60dc32
Time: 2018-11-07
Author: myleott@fb.com
File Name: fairseq/data/indexed_dataset.py
Class Name: IndexedCachedDataset
Method Name: prefetch


Project Name: andosa/treeinterpreter
Commit Name: ad486d721573a74966caaab62993b171b7c5b76b
Time: 2016-09-21
Author: ansaabas@microsoft.com
File Name: treeinterpreter/treeinterpreter.py
Class Name:
Method Name: _predict_tree