Skip to content

Commit

Permalink
Update executable_checker.py
Browse files Browse the repository at this point in the history
Commented jsonlines changes as functions mainly use json internally so jsonlines interactions aren't needed to write to new files
  • Loading branch information
divijmuthu authored Oct 22, 2024
1 parent 0d632bb commit f4f6d73
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import json
import time
from functools import lru_cache
import jsonlines
# import jsonlines

import requests # Do not remove this import even though it seems to be unused. It's used in the executable_checker_rest function.
from bfcl.eval_checker.constant import (
Expand All @@ -13,10 +13,10 @@
# Load the ground truth data for the `rest` test category
@lru_cache(maxsize=1) # cache the result, effectively loading data once
def load_eval_ground_truth():
# with open(REST_EVAL_GROUND_TRUTH_PATH, "r") as f:
# return f.readlines()
with jsonlines.open(REST_EVAL_GROUND_TRUTH_PATH) as reader:
return reader.readlines()
with open(REST_EVAL_GROUND_TRUTH_PATH, "r") as f:
return f.readlines()
# with jsonlines.open(REST_EVAL_GROUND_TRUTH_PATH) as reader:
# return reader.readlines()

#### Main function ####
def executable_checker_rest(func_call, idx):
Expand Down

0 comments on commit f4f6d73

Please sign in to comment.