iohadrubin commited on
Commit
5577fca
·
1 Parent(s): 81d6b77

Update mapped_nq.py

Browse files
Files changed (1) hide show
  1. mapped_nq.py +8 -3
mapped_nq.py CHANGED
@@ -77,7 +77,7 @@ inference_mapped_features = Features(base_features)
77
 
78
 
79
  class MappedNQConfig(datasets.BuilderConfig):
80
- """BuilderConfig for MappedQampariDPR."""
81
 
82
  def __init__(self, features=None, retriever=None, feature_format=None, **kwargs):
83
  super(MappedNQConfig, self).__init__(**kwargs)
@@ -196,9 +196,14 @@ class MappedNQ(datasets.GeneratorBasedBuilder):
196
 
197
  def _generate_examples(self, split):
198
  """This function returns the examples in the raw (text) form."""
199
-
 
 
 
 
 
200
  flattened_dataset = load_dataset("iohadrubin/nq.py", self.info.config_name).flatten()
201
- if split not in get_config_splits(path)[self.info.config_name] or split not in flattened_dataset:
202
  return
203
  flattened_dataset = flattened_dataset[split]
204
  # print(self.info)
 
77
 
78
 
79
  class MappedNQConfig(datasets.BuilderConfig):
80
+ """BuilderConfig for MappedNQ."""
81
 
82
  def __init__(self, features=None, retriever=None, feature_format=None, **kwargs):
83
  super(MappedNQConfig, self).__init__(**kwargs)
 
196
 
197
  def _generate_examples(self, split):
198
  """This function returns the examples in the raw (text) form."""
199
+ datasets.inspect_dataset("iohadrubin/nq","tmp_nq")
200
+
201
+ flattened_dataset = load_dataset("tmp_nq/nq.py",
202
+ self.info.config_name,
203
+ split=split).flatten()
204
+
205
  flattened_dataset = load_dataset("iohadrubin/nq.py", self.info.config_name).flatten()
206
+ if split not in get_config_splits("tmp_nq/nq.py")[self.info.config_name] or split not in flattened_dataset:
207
  return
208
  flattened_dataset = flattened_dataset[split]
209
  # print(self.info)