Skip to content

Commit 7d186ec

Browse files
committed
rename subset
1 parent df97fd0 commit 7d186ec

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ To generate code samples from a model, you can use the following command:
9292
```shell
9393
bigcodebench.generate \
9494
--model [model_name] \
95-
--subset [c2c|nl2c] \
95+
--subset [complete|instruct] \
9696
--greedy \
9797
--bs [bs] \
9898
--temperature [temp] \
@@ -102,12 +102,12 @@ bigcodebench.generate \
102102
--tp [gpu_number]
103103
```
104104
>
105-
The generated code samples will be stored in a file named `[model_name]--bigcodebench-[nl2c|c2c]--[backend]-[temp]-[n_samples].jsonl`. Alternatively, you can use the following command to utilize our pre-built docker images for generating code samples:
105+
The generated code samples will be stored in a file named `[model_name]--bigcodebench-[instruct|complete]--[backend]-[temp]-[n_samples].jsonl`. Alternatively, you can use the following command to utilize our pre-built docker images for generating code samples:
106106
>
107107
```shell
108108
docker run --gpus '"device=$CUDA_VISIBLE_DEVICES"' -v $(pwd):/bigcodebench -t terryzho/bigcodebench-generate-cu11:latest \
109109
--model [model_name] \
110-
--subset [c2c|nl2c] \
110+
--subset [complete|instruct] \
111111
--greedy \
112112
--bs [bs] \
113113
--temperature [temp] \
@@ -186,9 +186,9 @@ You are strongly recommended to use a sandbox such as [docker](https://docs.dock
186186

187187
```shell
188188
# mount the current directory to the container
189-
docker run -v $(pwd):/bigcodebench terryzho/bigcodebench-evaluate:latest --subset [c2c|nl2c] --samples samples.jsonl
189+
docker run -v $(pwd):/bigcodebench terryzho/bigcodebench-evaluate:latest --subset [complete|instruct] --samples samples.jsonl
190190
# ...Or locally ⚠️
191-
bigcodebench.evaluate --subset [c2c|nl2c] --samples samples.jsonl
191+
bigcodebench.evaluate --subset [complete|instruct] --samples samples.jsonl
192192
```
193193

194194
...Or if you want to try it locally regardless of the risks ⚠️:
@@ -202,7 +202,7 @@ pip install -r https://raw.githubusercontent.com/bigcode-project/bigcodebench-an
202202
Then, run the evaluation:
203203

204204
```shell
205-
bigcodebench.evaluate --subset [c2c|nl2c] --samples samples.jsonl
205+
bigcodebench.evaluate --subset [complete|instruct] --samples samples.jsonl
206206
```
207207

208208
> [!Tip]

bigcodebench/evaluate.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ def stucking_checker():
242242
def main():
243243
parser = argparse.ArgumentParser()
244244
parser.add_argument(
245-
"--subset", required=True, type=str, choices=["c2c", "nl2c"]
245+
"--subset", required=True, type=str, choices=["complete", "instruct"]
246246
)
247247
parser.add_argument("--samples", required=True, type=str)
248248
parser.add_argument("--parallel", default=None, type=int)

bigcodebench/generate.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ def codegen(
3333

3434
dataset = get_bigcodebench()
3535

36-
if model.is_direct_completion() and subset == "nl2c":
37-
raise Exception("Base model does not support direct completion for NL2Code tasks")
36+
if model.is_direct_completion() and subset == "instruct":
37+
raise Exception("Base model does not support direct completion for instructode tasks")
3838

3939
# create save_path if it doesn't exist, e.g., a/b.jsonl
4040
dirname = os.path.dirname(save_path)
@@ -70,7 +70,7 @@ def codegen(
7070
sidx = n_samples - nsamples
7171
while sidx < n_samples:
7272
prompt = task["prompt"]
73-
if subset == "nl2code":
73+
if subset == "instructode":
7474
prompt = task["instruction"]
7575
if strip_newlines:
7676
prompt = prompt.strip("\n")
@@ -119,7 +119,7 @@ def main():
119119
args = parser.parse_args()
120120

121121

122-
assert args.subset in ["c2c", "nl2c"], f"Invalid subset {args.subset}"
122+
assert args.subset in ["complete", "instruct"], f"Invalid subset {args.subset}"
123123
assert args.backend in ["vllm", "hf", "openai", "mistral", "anthropic", "google"]
124124

125125
if args.greedy and (args.temperature != 0 or args.bs != 1 or args.n_samples != 1)\

run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ BACKEND=openai
55
TEMP=0
66
N_SAMPLES=1
77
NUM_GPU=1
8-
SUBSET=nl2c
8+
SUBSET=instruct
99
if [[ $MODEL == *"/"* ]]; then
1010
ORG=$(echo $MODEL | cut -d'/' -f1)--
1111
BASE_MODEL=$(echo $MODEL | cut -d'/' -f2)

0 commit comments

Comments
 (0)