Skip to content

Commit

Permalink
[wip] Update
Browse files Browse the repository at this point in the history
  • Loading branch information
ljvmiranda921 committed Sep 20, 2024
1 parent c7f40f8 commit fa992d0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scripts/eval_helpsteer2_dev.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

import argparse
import logging
import json
import os
import sys
import hashlib
Expand Down Expand Up @@ -213,6 +214,10 @@ def main():
out_dataset = out_dataset.add_column("scores_chosen", scores_chosen)
out_dataset = out_dataset.add_column("scores_rejected", scores_rejected)

with open("metrics.json", "w") as f:
scores = {"hs2_dev_accuracy": sum(results) / len(results)}
json.dump(scores, f)


def check_tokenizer_chat_template(tokenizer):
"""
Expand Down Expand Up @@ -296,7 +301,7 @@ def _compute_rating(row, wt_vec):

all_cols = dataset.column_names
dataset = dataset.remove_columns([c for c in all_cols if c not in keep_columns])
breakpoint()
return dataset


def prepare_dialogue(
Expand Down

0 comments on commit fa992d0

Please sign in to comment.