5656try :
5757 repobench_p_tokenizer = AutoTokenizer .from_pretrained ("gpt2" )
5858except OSError :
59- print ("Warning: Could not load gpt2 tokenizer for Repobench-P. " " Falling back to basic split for token counting." )
59+ print ("Warning: Could not load gpt2 tokenizer for Repobench-P. Falling back to basic split for token counting." )
6060 repobench_p_tokenizer = None
6161
6262
@@ -108,8 +108,7 @@ def format_aider_prompt(problem_json: dict) -> str:
108108 """Format the prompt for Aider benchmark style problems."""
109109 question = problem_json .get ("content" , "" )
110110 return (
111- f"{ question } \n \n Please generate the code in the following format:\n "
112- "```python\n # Your code response here\n ```"
111+ f"{ question } \n \n Please generate the code in the following format:\n ```python\n # Your code response here\n ```"
113112 )
114113
115114
@@ -327,7 +326,7 @@ def normalize_problem_to_openai_format(
327326 try :
328327 labels = json .loads (labels_data )
329328 except json .JSONDecodeError :
330- print (f"Warning: Skipping ID { problem_id_str } in { filename } " " - malformed JSON in labels." )
329+ print (f"Warning: Skipping ID { problem_id_str } in { filename } - malformed JSON in labels." )
331330 return None
332331 elif isinstance (labels_data , dict ):
333332 labels = labels_data
@@ -426,10 +425,10 @@ def normalize_problem_to_openai_format(
426425 )
427426 return None
428427 if not final_user_content .strip () or not final_assistant_content .strip ():
429- print (f"Warning: Skipping ID { problem_id_str } in { filename } - " " empty processed content." )
428+ print (f"Warning: Skipping ID { problem_id_str } in { filename } - empty processed content." )
430429 return None
431430 if final_assistant_content .strip () == "import sys; sys.exit(0)" :
432- print (f"Warning: Skipping ID { problem_id_str } in { filename } - " " placeholder solution." )
431+ print (f"Warning: Skipping ID { problem_id_str } in { filename } - placeholder solution." )
433432 return None
434433
435434 return {
@@ -439,7 +438,7 @@ def normalize_problem_to_openai_format(
439438 ]
440439 }
441440 except Exception as e :
442- print (f"Warning: Skipping ID { problem_id_str } in { filename } - " f" error ({ type (e ).__name__ } : { e } )." )
441+ print (f"Warning: Skipping ID { problem_id_str } in { filename } - error ({ type (e ).__name__ } : { e } )." )
443442 import traceback
444443
445444 traceback .print_exc ()
@@ -474,7 +473,7 @@ def main():
474473 file_error_count += 1
475474 continue
476475
477- print (f"Processing file { filename_idx + 1 } /{ len (ALL_SOURCE_JSONL_FILES )} : " f" { filename } ..." )
476+ print (f"Processing file { filename_idx + 1 } /{ len (ALL_SOURCE_JSONL_FILES )} : { filename } ..." )
478477 lines_in_file = 0
479478 processed_in_file = 0
480479 skipped_in_file = 0
@@ -488,7 +487,7 @@ def main():
488487 try :
489488 problem_data = json .loads (stripped_line )
490489 except json .JSONDecodeError :
491- print (f"Warning: Malformed JSON on line { line_number } " f" in { filepath } . Skipping line." )
490+ print (f"Warning: Malformed JSON on line { line_number } in { filepath } . Skipping line." )
492491 skipped_in_file += 1
493492 continue
494493
@@ -507,7 +506,7 @@ def main():
507506 processed_count += processed_in_file
508507 skipped_count += skipped_in_file
509508 except Exception as e :
510- print (f"Error processing file { filepath } : { type (e ).__name__ } : { e } . " " Skipping rest of file." )
509+ print (f"Error processing file { filepath } : { type (e ).__name__ } : { e } . Skipping rest of file." )
511510 import traceback
512511
513512 traceback .print_exc ()
0 commit comments