bd7096d17a03f2c9375c7492f9e680e5cca7058e,onmt/inputters/dataset_base.py,Dataset,__init__,#Dataset#Any#Any#Any#Any#Any#Any#,109

Before Change


            examples.append(ex)

        // the dataset"s self.fields should have the same attributes as examples
        fields = dict(chain.from_iterable(ex_fields.values()))

        super(Dataset, self).__init__(examples, fields, filter_pred)

    def __getattr__(self, attr):

After Change


        fields = []
        for _, nf_list in ex_fields.items():
            assert len(nf_list) == 1
            fields.append(nf_list[0])

        super(Dataset, self).__init__(examples, fields, filter_pred)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: OpenNMT/OpenNMT-py
Commit Name: bd7096d17a03f2c9375c7492f9e680e5cca7058e
Time: 2019-02-15
Author: dylan.flaute@gmail.com
File Name: onmt/inputters/dataset_base.py
Class Name: Dataset
Method Name: __init__


Project Name: dmlc/gluon-nlp
Commit Name: f19ace982075ea009af81f5e9f687cc2276f50ea
Time: 2020-01-20
Author: 50716238+MoisesHer@users.noreply.github.com
File Name: scripts/bert/fp16_utils.py
Class Name:
Method Name: grad_global_norm


Project Name: ray-project/ray
Commit Name: 3e8164ff8aa0ac9bdd863e17a268b82e338fdd47
Time: 2020-09-09
Author: maxfitton@anyscale.com
File Name: python/ray/tests/test_metrics.py
Class Name:
Method Name: test_raylet_info_endpoint