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)