Skip to content

Commit 821f3a5

Browse files
committed
Update instruction prompts with ntlk fix
1 parent 1bf199d commit 821f3a5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tools/fix_v025.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def map_ds(sample):
5353
sample['complete_prompt'] = "import nltk\nnltk.download('stopwords')\n" + sample['complete_prompt']
5454
sample['instruct_prompt'] = sample['instruct_prompt'].replace(
5555
"\nYou should write self-contained code starting with:\n```\n",
56-
"\nYou should write self-contained code starting with:\n```\n"
56+
"\nYou should write self-contained code starting with:\n```\nimport nltk\nnltk.download('stopwords')\n"
5757
)
5858

5959
if sample["task_id"] in ["BigCodeBench/635"]:
@@ -68,16 +68,16 @@ def map_ds(sample):
6868
)
6969

7070
sample['instruct_prompt'] = sample['instruct_prompt'].replace(
71-
"# Importing the required libraries",
72-
"# Importing the required libraries\nimport nltk\nnltk.download('stopwords')\n"
71+
"\nYou should write self-contained code starting with:\n```\n",
72+
"\nYou should write self-contained code starting with:\n```\nimport nltk\nnltk.download('stopwords')\n"
7373
)
7474

7575
if sample["task_id"] in ["BigCodeBench/849"]:
7676
sample['code_prompt'] = "import nltk\nnltk.download('stopwords')\n" + sample['code_prompt']
7777
sample['complete_prompt'] = "import nltk\nnltk.download('stopwords')\n" + sample['complete_prompt']
7878
sample['instruct_prompt'] = sample['instruct_prompt'].replace(
7979
"\nYou should write self-contained code starting with:\n```\n",
80-
"\nYou should write self-contained code starting with:\n```\n"
80+
"\nYou should write self-contained code starting with:\n```\nimport nltk\nnltk.download('stopwords')\n"
8181
)
8282

8383
if sample["task_id"] in ["BigCodeBench/940"]:

0 commit comments

Comments
 (0)