gabeorlanski
commited on
Commit
•
c1e6bdf
1
Parent(s):
1d767ee
Update README.md
Browse files
README.md
CHANGED
@@ -87,12 +87,26 @@ DatasetDict({
|
|
87 |
- `signature`: The signature for the problem.
|
88 |
- `signature_with_docstring`: The signature with the adequately formatted docstring for the given problem.
|
89 |
- `arguments`: The arguments of the problem.
|
90 |
-
- `entry_fn_name`: The function's name to use an entry point.
|
91 |
-
- `entry_cls_name`: The class name to use an entry point.
|
92 |
- `solution`: The solution in Python.
|
93 |
-
- `
|
94 |
-
- `
|
95 |
-
- `
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
## Dataset Creation
|
97 |
See section 2 of the [BabelCode Paper](https://arxiv.org/abs/2302.01973) to learn more about how the datasets are translated.
|
98 |
|
|
|
87 |
- `signature`: The signature for the problem.
|
88 |
- `signature_with_docstring`: The signature with the adequately formatted docstring for the given problem.
|
89 |
- `arguments`: The arguments of the problem.
|
|
|
|
|
90 |
- `solution`: The solution in Python.
|
91 |
+
- `question_info`: The dict of information used for executing predictions. It has the keys:
|
92 |
+
- `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.
|
93 |
+
- `test_list`: The raw json line of the list of tests for the problem. To load them, use `json.loads`
|
94 |
+
- `test_case_ids`: The list of test case ids for the problem. These are used to determine if a prediction passes or not.
|
95 |
+
- `entry_fn_name`: The function's name to use an entry point.
|
96 |
+
- `entry_cls_name`: The class name to use an entry point.
|
97 |
+
|
98 |
+
**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`:
|
99 |
+
```python
|
100 |
+
>>> from datasets import load_dataset
|
101 |
+
>>> ds = load_dataset("gabeorlanski/bc-mbpp")['test']
|
102 |
+
>>> # The original entry_fn_name
|
103 |
+
>>> ds[0]['question_info']['entry_fn_name']
|
104 |
+
removeOcc
|
105 |
+
>>> # You MUST update the corresponding entry_fn_name
|
106 |
+
>>> ds[0]['question_info']['entry_fn_name'] = 'f'
|
107 |
+
>>> ds[0]['question_info']['entry_fn_name']
|
108 |
+
f
|
109 |
+
```
|
110 |
## Dataset Creation
|
111 |
See section 2 of the [BabelCode Paper](https://arxiv.org/abs/2302.01973) to learn more about how the datasets are translated.
|
112 |
|