sps commited on
Commit
1caa6cf
1 Parent(s): 324bfbf

Refactor: Prefix subtokens

Browse files
Files changed (1) hide show
  1. codequeries.py +4 -1
codequeries.py CHANGED
@@ -173,7 +173,10 @@ class Codequeries(datasets.GeneratorBasedBuilder):
173
  ]
174
  features["example_type"] = datasets.Value("int8")
175
  features["single_hop"] = datasets.Value("bool")
176
- features["subtokenized_input_sequence"] = datasets.features.Sequence(datasets.Value("string"))
 
 
 
177
  features["label_sequence"] = datasets.features.Sequence(datasets.Value("int8"))
178
  if self.config.name == "twostep":
179
  features["relevance_label"] = datasets.Value("int8")
 
173
  ]
174
  features["example_type"] = datasets.Value("int8")
175
  features["single_hop"] = datasets.Value("bool")
176
+ if self.config.name != "prefix":
177
+ features["subtokenized_input_sequence"] = datasets.features.Sequence(datasets.Value("string"))
178
+ else:
179
+ features["subtokenized_input_sequence"] = datasets.features.Sequence(datasets.Value("int32"))
180
  features["label_sequence"] = datasets.features.Sequence(datasets.Value("int8"))
181
  if self.config.name == "twostep":
182
  features["relevance_label"] = datasets.Value("int8")