Datasets:
Size:
1M<n<10M
ArXiv:
Tags:
programming-language
code
program-synthesis
automatic-code-repair
code-retrieval
code-translation
License:
update loader
Browse files- xCodeEval.py +2 -2
xCodeEval.py
CHANGED
|
@@ -2060,7 +2060,7 @@ class xCodeEval(datasets.GeneratorBasedBuilder):
|
|
| 2060 |
with open(filepath) as rp:
|
| 2061 |
for idx, line in enumerate(rp):
|
| 2062 |
sample = json.loads(line)
|
| 2063 |
-
if task_name not in _PROBLEM_DESC_REQ_TASK:
|
| 2064 |
yield idx, sample # if problem_description_file is None then unit_test_db_file should be None
|
| 2065 |
|
| 2066 |
# if problem_description_file is not None, the sample has `src_uid`
|
|
@@ -2069,7 +2069,7 @@ class xCodeEval(datasets.GeneratorBasedBuilder):
|
|
| 2069 |
for key, ckey in _PROB_DESC_TEXT_FEATURES.items():
|
| 2070 |
sample[ckey] = prob_desc[key]
|
| 2071 |
|
| 2072 |
-
if task_name not in _UNIT_TEST_REQ_TASK:
|
| 2073 |
yield idx, sample
|
| 2074 |
|
| 2075 |
sample["hidden_unit_test"] = unit_test_db[src_uid]
|
|
|
|
| 2060 |
with open(filepath) as rp:
|
| 2061 |
for idx, line in enumerate(rp):
|
| 2062 |
sample = json.loads(line)
|
| 2063 |
+
if task_name not in _PROBLEM_DESC_REQ_TASK and problem_descriptions is not None:
|
| 2064 |
yield idx, sample # if problem_description_file is None then unit_test_db_file should be None
|
| 2065 |
|
| 2066 |
# if problem_description_file is not None, the sample has `src_uid`
|
|
|
|
| 2069 |
for key, ckey in _PROB_DESC_TEXT_FEATURES.items():
|
| 2070 |
sample[ckey] = prob_desc[key]
|
| 2071 |
|
| 2072 |
+
if task_name not in _UNIT_TEST_REQ_TASK and unit_test_db is not None:
|
| 2073 |
yield idx, sample
|
| 2074 |
|
| 2075 |
sample["hidden_unit_test"] = unit_test_db[src_uid]
|