Skip to content
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
2 changes: 1 addition & 1 deletion open_instruct/ground_truth_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -887,7 +887,7 @@ def build_all_verifiers(args) -> Dict[str, VerifierFunction]:
for judge_type in JUDGE_PROMPT_MAP.keys():
instance = LMJudgeVerifier(judge_type, LMJudgeVerifierConfig.from_args(args))
verifiers[instance.name.lower()] = instance

# if we have remap arg, remap!
if args.remap_verifier:
remap = args.remap_verifier.split("=")
Expand Down
2 changes: 1 addition & 1 deletion open_instruct/judge_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def extract_json_score_with_fallback(score_str: str) -> "tuple[str, float]":
# escape newlines
cleaned_str = cleaned_str.replace("\r\n", "\n").replace("\n", "\\n")
# escape backslashes
cleaned_str = re.sub(r'\\(?!["\\/bfnrtu])', r'\\\\', cleaned_str)
cleaned_str = re.sub(r'\\(?!["\\/bfnrtu])', r"\\\\", cleaned_str)

cleaned_str = cleaned_str.strip()

Expand Down
7 changes: 6 additions & 1 deletion open_instruct/model_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,12 @@ async def apply_verifiable_reward(
async_tasks.append(task)
# use reward_func.name to get the name of the verifier, rather than ds in case we have done remapping.
task_metadata.append(
{"response_idx": i, "dataset": reward_func.name, "reward_weight": reward_func.weight, "reward_mult": reward_mult}
{
"response_idx": i,
"dataset": reward_func.name,
"reward_weight": reward_func.weight,
"reward_mult": reward_mult,
}
)

# Execute all tasks in parallel
Expand Down