@@ -19,7 +19,7 @@ def inspection(args):
1919 shutil .rmtree (path , ignore_errors = True )
2020 if not os .path .exists (path ):
2121 os .makedirs (path )
22- problems = get_bigcodebench ()
22+ problems = get_bigcodebench (subset = flags . subset )
2323
2424 eval_results = json .load (open (args .eval_results , "r" ))
2525 for task_id , results in eval_results ["eval" ].items ():
@@ -30,7 +30,7 @@ def inspection(args):
3030 os .makedirs (task_path )
3131 task_id_data = problems [task_id ]
3232 with open (os .path .join (task_path , "ground_truth.py" ), "w" ) as f :
33- f .write (task_id_data [f"{ args .subset } _prompt" ] + "\n \n " + task_id_data ["canonical_solution" ])
33+ f .write (task_id_data [f"{ args .split } _prompt" ] + "\n \n " + task_id_data ["canonical_solution" ])
3434
3535 # write test
3636 with open (os .path .join (task_path , "test_case.py" ), "w" ) as f :
@@ -49,7 +49,10 @@ def inspection(args):
4949def main ():
5050 parser = argparse .ArgumentParser ()
5151 parser .add_argument ("--eval-results" , required = True , type = str )
52- parser .add_argument ("--subset" , required = True , type = str )
52+ parser .add_argument (
53+ "--split" , required = True , type = str , choices = ["complete" , "instruct" ]
54+ )
55+ parser .add_argument ("--subset" , default = "hard" , type = str , choices = ["full" , "hard" ])
5356 parser .add_argument ("--in-place" , action = "store_true" )
5457 args = parser .parse_args ()
5558
0 commit comments