prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  [DOC]: Unnecessary step to reformat questions
  ### 📚 The doc issue
  
  The current documentation contains unnecessary step to reformat questions from FastChat's format to our internal format.
  [tensor] fix some unittests
  
  [tensor] fix some unittests
  
  
  </issue>
  <code>
  [start of applications/Chat/evaluate/format_questions.py]
  1 import argparse
  2 import os
  3 import json
  4 import copy
  5 
  6 from utils import jdump, get_json_list
  7 
  8 
  9 def format_questions(args):
  10     questions = get_json_list(args.questions_path)
  11     keys=questions[0].keys()
  12     
  13     formatted_questions=copy.deepcopy(questions)
  14     for i in range(len(formatted_questions)):
  15         formatted_questions[i]['instruction']=questions[i]['text']
  16         formatted_questions[i]['input']=""
  17         formatted_questions[i]['output']=""
  18         formatted_questions[i]['id']=questions[i]['question_id']
  19         for key in keys:
  20             if key=="category":
  21                 continue
  22             del formatted_questions[i][key]
  23     
  24     jdump(formatted_questions, args.save_path)
  25 
  26 if __name__ == '__main__':
  27     parser = argparse.ArgumentParser()
  28     parser.add_argument('--questions_path', type=str, default='table/question.jsonl')
  29     parser.add_argument('--save_path', type=str, default="table/questions.json")
  30     args = parser.parse_args()
  31     format_questions(args)
  [end of applications/Chat/evaluate/format_questions.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/applications/Chat/evaluate/format_questions.py b/applications/Chat/evaluate/format_questions.py
  deleted file mode 100644
  --- a/applications/Chat/evaluate/format_questions.py
  +++ /dev/null
  @@ -1,31 +0,0 @@
  -import argparse
  -import os
  -import json
  -import copy
  -
  -from utils import jdump, get_json_list
  -
  -
  -def format_questions(args):
  -    questions = get_json_list(args.questions_path)
  -    keys=questions[0].keys()
  -    
  -    formatted_questions=copy.deepcopy(questions)
  -    for i in range(len(formatted_questions)):
  -        formatted_questions[i]['instruction']=questions[i]['text']
  -        formatted_questions[i]['input']=""
  -        formatted_questions[i]['output']=""
  -        formatted_questions[i]['id']=questions[i]['question_id']
  -        for key in keys:
  -            if key=="category":
  -                continue
  -            del formatted_questions[i][key]
  -    
  -    jdump(formatted_questions, args.save_path)
  -
  -if __name__ == '__main__':
  -    parser = argparse.ArgumentParser()
  -    parser.add_argument('--questions_path', type=str, default='table/question.jsonl')
  -    parser.add_argument('--save_path', type=str, default="table/questions.json")
  -    args = parser.parse_args()
  -    format_questions(args)
  \ No newline at end of file
  
verification_info: {"golden_diff": "diff --git a/applications/Chat/evaluate/format_questions.py b/applications/Chat/evaluate/format_questions.py\ndeleted file mode 100644\n--- a/applications/Chat/evaluate/format_questions.py\n+++ /dev/null\n@@ -1,31 +0,0 @@\n-import argparse\n-import os\n-import json\n-import copy\n-\n-from utils import jdump, get_json_list\n-\n-\n-def format_questions(args):\n-    questions = get_json_list(args.questions_path)\n-    keys=questions[0].keys()\n-    \n-    formatted_questions=copy.deepcopy(questions)\n-    for i in range(len(formatted_questions)):\n-        formatted_questions[i]['instruction']=questions[i]['text']\n-        formatted_questions[i]['input']=\"\"\n-        formatted_questions[i]['output']=\"\"\n-        formatted_questions[i]['id']=questions[i]['question_id']\n-        for key in keys:\n-            if key==\"category\":\n-                continue\n-            del formatted_questions[i][key]\n-    \n-    jdump(formatted_questions, args.save_path)\n-\n-if __name__ == '__main__':\n-    parser = argparse.ArgumentParser()\n-    parser.add_argument('--questions_path', type=str, default='table/question.jsonl')\n-    parser.add_argument('--save_path', type=str, default=\"table/questions.json\")\n-    args = parser.parse_args()\n-    format_questions(args)\n\\ No newline at end of file\n", "issue": "[DOC]: Unnecessary step to reformat questions\n### \ud83d\udcda The doc issue\n\nThe current documentation contains unnecessary step to reformat questions from FastChat's format to our internal format.\n[tensor] fix some unittests\n\n[tensor] fix some unittests\n\n", "before_files": [{"content": "import argparse\nimport os\nimport json\nimport copy\n\nfrom utils import jdump, get_json_list\n\n\ndef format_questions(args):\n    questions = get_json_list(args.questions_path)\n    keys=questions[0].keys()\n    \n    formatted_questions=copy.deepcopy(questions)\n    for i in range(len(formatted_questions)):\n        formatted_questions[i]['instruction']=questions[i]['text']\n        formatted_questions[i]['input']=\"\"\n        formatted_questions[i]['output']=\"\"\n        formatted_questions[i]['id']=questions[i]['question_id']\n        for key in keys:\n            if key==\"category\":\n                continue\n            del formatted_questions[i][key]\n    \n    jdump(formatted_questions, args.save_path)\n\nif __name__ == '__main__':\n    parser = argparse.ArgumentParser()\n    parser.add_argument('--questions_path', type=str, default='table/question.jsonl')\n    parser.add_argument('--save_path', type=str, default=\"table/questions.json\")\n    args = parser.parse_args()\n    format_questions(args)", "path": "applications/Chat/evaluate/format_questions.py"}]}