Datasets:

Languages:
English
ArXiv:
Tags:
code
License:
gabeorlanski commited on
Commit
5fc724b
1 Parent(s): 0749511

Update bc-mbpp.py

Browse files
Files changed (1) hide show
  1. bc-mbpp.py +14 -5
bc-mbpp.py CHANGED
@@ -51,6 +51,9 @@ _QUESTION_INFO_KEYS = {
51
  "test_code",
52
  "test_list",
53
  "test_case_ids",
 
 
 
54
  }
55
 
56
  class BCMBPP(datasets.GeneratorBasedBuilder):
@@ -75,6 +78,15 @@ class BCMBPP(datasets.GeneratorBasedBuilder):
75
  DEFAULT_CONFIG_NAME = "all"
76
 
77
  def _info(self):
 
 
 
 
 
 
 
 
 
78
  features = datasets.Features({
79
  "qid": datasets.Value("string"),
80
  "title": datasets.Value("string"),
@@ -84,11 +96,8 @@ class BCMBPP(datasets.GeneratorBasedBuilder):
84
  "signature": datasets.Value("string"),
85
  "arguments": datasets.Sequence(datasets.Value("string")),
86
  "solution": datasets.Value("string"),
87
- "question_info":
88
- datasets.Features({
89
- k:datasets.Value(dtype="string")
90
- for k in _QUESTION_INFO_KEYS
91
- })
92
  })
93
  description = _DESCRIPTION
94
  if self.config.name != 'all':
 
51
  "test_code",
52
  "test_list",
53
  "test_case_ids",
54
+ "commands",
55
+ "timeouts",
56
+ "extension"
57
  }
58
 
59
  class BCMBPP(datasets.GeneratorBasedBuilder):
 
78
  DEFAULT_CONFIG_NAME = "all"
79
 
80
  def _info(self):
81
+ list_keys = ['timeouts', 'commands', 'test_case_ids']
82
+ question_info_type = {
83
+ k:datasets.Value(dtype="string")
84
+ for k in _QUESTION_INFO_KEYS if k not in list_keys
85
+ }
86
+ question_info_type['test_case_ids'] = datasets.Sequence(datasets.Value('string'))
87
+ question_info_type['commands'] = datasets.Sequence(datasets.Sequence(datasets.Value('string')))
88
+ question_info_type['timeouts'] = datasets.Sequence(datasets.Value('int32'))
89
+
90
  features = datasets.Features({
91
  "qid": datasets.Value("string"),
92
  "title": datasets.Value("string"),
 
96
  "signature": datasets.Value("string"),
97
  "arguments": datasets.Sequence(datasets.Value("string")),
98
  "solution": datasets.Value("string"),
99
+ "question_info": datasets.Features(question_info_type)
100
+
 
 
 
101
  })
102
  description = _DESCRIPTION
103
  if self.config.name != 'all':