Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
10 changes: 5 additions & 5 deletions benchmark/plugins/guru_math/reward.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ def __call__( # type: ignore
format_score_coef: Optional[float] = 0.1,
**kwargs,
) -> dict[str, float]:
from .naive_dapo import compute_score
from trinity.utils.math_utils import compute_score

ret = compute_score(response, truth, None) # type: ignore
return {"accuracy": ret["score"], "format_score": 0}
score = compute_score(response, truth) # type: ignore
return {"accuracy": score, "format_score": 0}


@REWARD_FUNCTIONS.register_module("math_boxed_reward_prime_math")
Expand All @@ -32,5 +32,5 @@ def __call__( # type: ignore
) -> dict[str, float]:
from verl.utils.reward_score.prime_math import compute_score

ret = compute_score(response, truth)
return {"accuracy": ret["score"], "format_score": 0}
res = compute_score(response, truth)
return {"accuracy": res["score"], "format_score": 0}
4 changes: 2 additions & 2 deletions examples/bots/workflow/bots_math_boxed_reward.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ def __call__( # type: ignore
format_score_coef: Optional[float] = 0.1,
**kwargs,
) -> dict[str, float]:
from trinity.plugins.bots_reward import compute_score
from trinity.plugins.bots_reward import compute_score_bots

accuracy_score = compute_score(response, truth)
accuracy_score = compute_score_bots(response, truth)

format_score = 0.0
if with_think and not validate_think_pattern(response):
Expand Down
Loading
Loading