sps commited on
Commit
b8d9887
1 Parent(s): 9fa7b76

Update data script - make a list of context blocks

Browse files
Files changed (1) hide show
  1. codequeries.py +2 -3
codequeries.py CHANGED
@@ -130,13 +130,13 @@ class Codequeries(datasets.GeneratorBasedBuilder):
130
  # features = {feature: datasets.Value("string") for feature in self.config.features}
131
  features = {}
132
  features["query_name"] = datasets.Value("string")
133
- features["context_blocks"] = datasets.features.Sequence(
134
  {
135
  "content": datasets.Value("string"),
136
  "metadata": datasets.Value("string"),
137
  "header": datasets.Value("string")
138
  }
139
- )
140
  features["answer_spans"] = [
141
  {
142
  'span': datasets.Value("string"),
@@ -146,7 +146,6 @@ class Codequeries(datasets.GeneratorBasedBuilder):
146
  'end_column': datasets.Value("int32")
147
  }
148
  ]
149
-
150
  features["supporting_fact_spans"] = [
151
  {
152
  'span': datasets.Value("string"),
 
130
  # features = {feature: datasets.Value("string") for feature in self.config.features}
131
  features = {}
132
  features["query_name"] = datasets.Value("string")
133
+ features["context_blocks"] = [
134
  {
135
  "content": datasets.Value("string"),
136
  "metadata": datasets.Value("string"),
137
  "header": datasets.Value("string")
138
  }
139
+ ]
140
  features["answer_spans"] = [
141
  {
142
  'span': datasets.Value("string"),
 
146
  'end_column': datasets.Value("int32")
147
  }
148
  ]
 
149
  features["supporting_fact_spans"] = [
150
  {
151
  'span': datasets.Value("string"),