Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change data storage location #20

Merged
merged 1 commit into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions scripts/run_dpo.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@
api = HfApi(token=HF_TOKEN)

# data repo to upload results
EVAL_REPO = "ai2-rlhf-collab/rm-benchmark-results"
PREFS_REPO = "ai2-rlhf-collab/rm-testset-results"
EVAL_REPO = "ai2-adapt-dev/HERM-Results"


def get_args():
Expand Down Expand Up @@ -206,10 +205,11 @@ def main():

# Upload results as json
if not args.do_not_save:
sub_path = "eval-set/" if not args.pref_sets else "pref-sets/"
scores_url = api.upload_file(
path_or_fileobj=path,
path_in_repo=f"data/{args.model}.json",
repo_id=EVAL_REPO if not args.pref_sets else PREFS_REPO, # push to correct results repo
path_in_repo=sub_path + f"{args.model}.json",
repo_id=EVAL_REPO, # push to correct results repo
repo_type="dataset",
commit_message=f"Add reward model scores for model {args.model}",
)
Expand Down
8 changes: 4 additions & 4 deletions scripts/run_rm.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@
api = HfApi(token=HF_TOKEN)

# data repo to upload results
EVAL_REPO = "ai2-adapt-dev/rm-benchmark-results"
PREFS_REPO = "ai2-adapt-dev/rm-testset-results"
EVAL_REPO = "ai2-adapt-dev/HERM-Results"


def get_args():
Expand Down Expand Up @@ -317,10 +316,11 @@ def custom_collate_fn(batch):

# Upload results as json
if not args.do_not_save:
sub_path = "eval-set/" if not args.pref_sets else "pref-sets/"
scores_url = api.upload_file(
path_or_fileobj=path,
path_in_repo=f"data/{args.model}.json",
repo_id=EVAL_REPO if not args.pref_sets else PREFS_REPO, # push to correct results repo
path_in_repo=sub_path + f"{args.model}.json",
repo_id=EVAL_REPO, # push to correct results repo
repo_type="dataset",
commit_message=f"Add reward model scores for model {args.model}",
)
Expand Down
Loading