Datasets:

Modalities:
Text
Languages:
English
ArXiv:
Tags:
code
Libraries:
Datasets
License:
gabeorlanski commited on
Commit
5807e44
·
1 Parent(s): 0549434

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +19 -5
README.md CHANGED
@@ -73,12 +73,26 @@ DatasetDict({
73
  - `signature`: The signature for the problem.
74
  - `signature_with_docstring`: The signature with the adequately formatted docstring for the given problem.
75
  - `arguments`: The arguments of the problem.
76
- - `entry_fn_name`: The function's name to use an entry point.
77
- - `entry_cls_name`: The class name to use an entry point.
78
  - `source`: The source solution in Python.
79
- - `test_code`: The raw testing script used in the language. If you want to use this, replace `PLACEHOLDER_FN_NAME` (and `PLACEHOLDER_CLS_NAME` if needed) with the corresponding entry points. Next, replace `PLACEHOLDER_CODE_BODY` with the postprocessed prediction.
80
- - `test_list`: The raw json line of the list of tests for the problem. To load them, use `json.loads`
81
- - `test_case_ids`: The list of test case ids for the problem. These are used to determine if a prediction passes or not.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
82
  ## Dataset Creation
83
  See section 2 and section 4.4 of the [BabelCode Paper](https://arxiv.org/abs/2302.01973) to learn more about how the datasets are translated.
84
 
 
73
  - `signature`: The signature for the problem.
74
  - `signature_with_docstring`: The signature with the adequately formatted docstring for the given problem.
75
  - `arguments`: The arguments of the problem.
 
 
76
  - `source`: The source solution in Python.
77
+ - `question_info`: The dict of information used for executing predictions. It has the keys:
78
+ - `test_code`: The raw testing script used in the language. If you want to use this, replace `PLACEHOLDER_FN_NAME` (and `PLACEHOLDER_CLS_NAME` if needed) with the corresponding entry points. Next, replace `PLACEHOLDER_CODE_BODY` with the postprocessed prediction.
79
+ - `test_list`: The raw json line of the list of tests for the problem. To load them, use `json.loads`
80
+ - `test_case_ids`: The list of test case ids for the problem. These are used to determine if a prediction passes or not.
81
+ - `entry_fn_name`: The function's name to use an entry point.
82
+ - `entry_cls_name`: The class name to use an entry point.
83
+
84
+ **NOTE:** If you want to use a different function name (or class name for languages that require class names) for the prediction, you must update the `entry_fn_name` and `entry_cls_name` accordingly. For example, if you have the original question with `entry_fn_name` of `add`, but want to change it to `f`, you must update `ds["question_info"]["entry_fn_name"]` to `f`:
85
+ ```python
86
+ >>> from datasets import load_dataset
87
+ >>> ds = load_dataset("gabeorlanski/bc-mbpp")['test']
88
+ >>> # The original entry_fn_name
89
+ >>> ds[0]['question_info']['entry_fn_name']
90
+ removeOcc
91
+ >>> # You MUST update the corresponding entry_fn_name
92
+ >>> ds[0]['question_info']['entry_fn_name'] = 'f'
93
+ >>> ds[0]['question_info']['entry_fn_name']
94
+ f
95
+ ```
96
  ## Dataset Creation
97
  See section 2 and section 4.4 of the [BabelCode Paper](https://arxiv.org/abs/2302.01973) to learn more about how the datasets are translated.
98