Chenghao Yang commited on
Commit
c967474
·
1 Parent(s): a9e6a74

fix problems in loading scripts

Browse files
Files changed (1) hide show
  1. quality.py +7 -6
quality.py CHANGED
@@ -43,20 +43,20 @@ class QualityConfig(datasets.BuilderConfig):
43
  class Quality(datasets.GeneratorBasedBuilder):
44
  BUILDER_CONFIGS = [
45
  QualityConfig(
46
- name=f"dpr-first-{x}%-maxlen-150",
47
- features=['question', "context", "options", "output"],
48
  data_url=f"extractive_dpr_agent_first_20splits_maxlen150/agent_{x}.zip",
49
  citation=_QUALITY_CITATION,
50
- description=f"Using DPR (NYU-version) to summarize first {x}% of the document within 150 max tokens"
51
  ) for x in range(0, 20)
52
  ] + list(itertools.chain.from_iterable([
53
  [
54
  QualityConfig(
55
- name=f"dpr-rest-{x}%-maxlen-{maxlen}",
56
- features=['question', "context", "options", "output"],
57
  data_url=f"extractive_dpr_agent_rest_20splits_maxlen{maxlen}/agent_{x}.zip",
58
  citation=_QUALITY_CITATION,
59
- description=f"Using DPR (NYU-version) to summarize rest {x}% of the document within {maxlen} max tokens"
60
  ) for x in range(0, 20)
61
  ] for maxlen in [25, 50, 100, 150]
62
  ]))
@@ -73,6 +73,7 @@ class Quality(datasets.GeneratorBasedBuilder):
73
 
74
  def _info(self) -> DatasetInfo:
75
  features = {feature: datasets.Value("string") for feature in self.config.features}
 
76
  return datasets.DatasetInfo(
77
  description=self.config.description,
78
  features=datasets.Features(features),
 
43
  class Quality(datasets.GeneratorBasedBuilder):
44
  BUILDER_CONFIGS = [
45
  QualityConfig(
46
+ name=f"dpr-first-{x * 5}%-maxlen-150",
47
+ features=['question', "context", "output"],
48
  data_url=f"extractive_dpr_agent_first_20splits_maxlen150/agent_{x}.zip",
49
  citation=_QUALITY_CITATION,
50
+ description=f"Using DPR (NYU-version) to summarize first {x * 5}% of the document within 150 max tokens"
51
  ) for x in range(0, 20)
52
  ] + list(itertools.chain.from_iterable([
53
  [
54
  QualityConfig(
55
+ name=f"dpr-rest-{x * 5}%-maxlen-{maxlen}",
56
+ features=['question', "context", "output"],
57
  data_url=f"extractive_dpr_agent_rest_20splits_maxlen{maxlen}/agent_{x}.zip",
58
  citation=_QUALITY_CITATION,
59
+ description=f"Using DPR (NYU-version) to summarize rest {x * 5}% of the document within {maxlen} max tokens"
60
  ) for x in range(0, 20)
61
  ] for maxlen in [25, 50, 100, 150]
62
  ]))
 
73
 
74
  def _info(self) -> DatasetInfo:
75
  features = {feature: datasets.Value("string") for feature in self.config.features}
76
+ features['options'] = datasets.Sequence(datasets.Value("string"))
77
  return datasets.DatasetInfo(
78
  description=self.config.description,
79
  features=datasets.Features(features),