Skip to content

Commit

Permalink
change the arg
Browse files Browse the repository at this point in the history
  • Loading branch information
shuishen112 committed Dec 23, 2024
1 parent dce9b6e commit 5b541a0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion eval_gsm.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
# open the json file and read the data
import json
import re
import argparse

parser = argparse.ArgumentParser()
parser.add_argument("--file", type=str, default="experiment/gsm.jsonl")
args = parser.parse_args()


def extract_code(text):
Expand All @@ -12,7 +17,7 @@ def extract_code(text):

correct = 0
all_count = 0
with open("experiment/gsm.jsonl", "r") as f:
with open(args.file, "r") as f:
for line in f:
all_count += 1
data = json.loads(line)
Expand Down

0 comments on commit 5b541a0

Please sign in to comment.