Skip to content

Commit

Permalink
Merge pull request #58 from nzw0301/fix-save-all
Browse files Browse the repository at this point in the history
Fix `save_all` bug
  • Loading branch information
ljvmiranda921 authored Jan 3, 2025
2 parents bf7b613 + ed37da6 commit e4144d1
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions scripts/run_rewardbench.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
import argparse
import json
import logging
import os
import sys
from pathlib import Path

Expand All @@ -29,7 +28,6 @@
import transformers
from accelerate import Accelerator
from accelerate.logging import get_logger
from datasets import load_dataset
from rewardbench import DPO_MODEL_CONFIG, REWARD_MODEL_CONFIG
from rewardbench import check_tokenizer_chat_template, load_eval_dataset
from rewardbench.constants import EXAMPLE_COUNTS, SUBSET_MAPPING
Expand Down Expand Up @@ -423,7 +421,7 @@ def main():

with output_path.open("w") as f:
for chosen, rejected in zip(scores_chosen, scores_rejected):
f.write(json.dumps({"chosen": scores_chosen, "rejected": scores_rejected}) + "\n")
f.write(json.dumps({"chosen": chosen, "rejected": rejected}) + "\n")


if __name__ == "__main__":
Expand Down

0 comments on commit e4144d1

Please sign in to comment.