Skip to content

Commit

Permalink
chore: reduce redunant output
Browse files Browse the repository at this point in the history
  • Loading branch information
TianyiQ committed Nov 28, 2024
1 parent 273e501 commit 418255f
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/evaluation/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,6 @@ def generate_alpaca(source: str, dir: str, rearrange = True, logprobs = False):
If both (1) and (2) are mostly true, output 'YES' verbatim, otherwise 'NO' verbatim. If you are unsure, output 'SKIP' verbatim. No extra output is allowed.
"""
cut = 0
print("logprobs", logprobs)
if source == "mc" or source == "foundation":
"""
ab, repeat, compare, each 'repeat' times.
Expand Down Expand Up @@ -537,15 +536,14 @@ def generate_alpaca(source: str, dir: str, rearrange = True, logprobs = False):
) as f:
temp = json.load(f)
except:
print("writing in new input.json")
temp = []

temp.extend(output_list_dic)
with open(
os.path.join(root, "src", "evaluation", "assets", "input_alpaca.json"), "w"
) as f:
json.dump(temp, f)
print("done", source)

elif source == "views":
"""
abcd (one fav. and one worst), repeat, each 'repeat' times.
Expand Down Expand Up @@ -641,14 +639,12 @@ def generate_alpaca(source: str, dir: str, rearrange = True, logprobs = False):
) as f:
temp = json.load(f)

print("appending to input.json")

temp.extend(output_list_dic)
with open(
os.path.join(root, "src", "evaluation", "assets", "input_alpaca.json"), "w"
) as f:
json.dump(temp, f)
print("done", source, cut, "made the cut")



def get_dim(key, dict_list):
Expand Down

0 comments on commit 418255f

Please sign in to comment.