From 72b8cc45f42b08d05bedda2b8bd1fac36db8f6ce Mon Sep 17 00:00:00 2001 From: Tilman Kamp <5991088+tilmankamp@users.noreply.github.com> Date: Tue, 17 Sep 2019 10:30:19 +0200 Subject: [PATCH] Fix for split field case --- align/export.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/align/export.py b/align/export.py index 85fca6a..93fd087 100644 --- a/align/export.py +++ b/align/export.py @@ -266,7 +266,7 @@ def main(args): else: train_size, sample_size = get_set_sizes(len(partition_fragments)) if args.split_field: - portions = engroup(partition_fragments, lambda f: get_meta(f, args.split_field)).values() + portions = list(engroup(partition_fragments, lambda f: get_meta(f, args.split_field)).values()) portions.sort(key=lambda p: len(p)) train_set, dev_set, test_set = [], [], [] for offset, sample_set in [(0, dev_set), (1, test_set)]: