Ubuntu
commited on
Commit
·
73ed1f9
1
Parent(s):
8d16a51
fix dup keys
Browse files- sc2qa_commoncrawl.py +2 -2
sc2qa_commoncrawl.py
CHANGED
@@ -97,8 +97,8 @@ class SC2QA(datasets.GeneratorBasedBuilder):
|
|
97 |
key = 0
|
98 |
with open(filepath, encoding="ascii", errors='ignore') as f:
|
99 |
csv_reader = csv.DictReader(f)
|
100 |
-
for row in csv_reader:
|
101 |
if split == "test": # This avoids error when doing data type converation from empty string
|
102 |
row["length bucket"] = "0"
|
103 |
row["qa classifier score"] = "0.0"
|
104 |
-
yield
|
|
|
97 |
key = 0
|
98 |
with open(filepath, encoding="ascii", errors='ignore') as f:
|
99 |
csv_reader = csv.DictReader(f)
|
100 |
+
for i, row in enumerate(csv_reader):
|
101 |
if split == "test": # This avoids error when doing data type converation from empty string
|
102 |
row["length bucket"] = "0"
|
103 |
row["qa classifier score"] = "0.0"
|
104 |
+
yield i, row
|