From f844775f1ea7ee72371f8b4942f3607fac903fdb Mon Sep 17 00:00:00 2001 From: sora <2075279110@qq.com> Date: Thu, 17 Sep 2026 09:24:54 +0000 Subject: [PATCH] tau2 scorer: read the composite 'reward' field tau2's current reward_info carries 'reward' (composite) + db_check / action_checks; the scorer read the old environment_reward / communication_reward split that no longer exists -- simulations scored 1.0 came out 0.0. Fallback to the old split kept for older engines. Co-Authored-By: Claude --- evalharness/eval/recipes/agent.py | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/evalharness/eval/recipes/agent.py b/evalharness/eval/recipes/agent.py index 73e1d7d..6a90ba3 100644 --- a/evalharness/eval/recipes/agent.py +++ b/evalharness/eval/recipes/agent.py @@ -262,16 +262,23 @@ def swe_bench_verified(): def _tau2_reward(pred, target, sample, ctx): - """Score from the official engine's reward_info (env_state).""" + """Score from the official engine's reward_info (env_state). + + Current tau2 reward_info carries the COMPOSITE 'reward' plus detail + fields (db_check / action_checks / communicate_checks); the old + environment_reward/communication_reward split no longer exists.""" env_state = ctx.params.get('env_state') or {} rewards = env_state.get('tau2_rewards') or {} - env_r = rewards.get('environment_reward') - comm_r = rewards.get('communication_reward') - vals = [r for r in (env_r, comm_r) if isinstance(r, (int, float))] - score = float(sum(vals) / len(vals)) if vals else 0.0 - return ({'acc': score}, {'acc': {'mode': 'official_tau2', - 'env_reward': env_r, - 'comm_reward': comm_r}}) + r = rewards.get('reward') + if not isinstance(r, (int, float)): + vals = [v for v in (rewards.get('environment_reward'), + rewards.get('communication_reward')) + if isinstance(v, (int, float))] + r = sum(vals) / len(vals) if vals else 0.0 + return ({'acc': float(r)}, {'acc': {'mode': 'official_tau2', + 'reward': r, + 'db_check': rewards.get('db_check'), + 'note': str((rewards.get('info') or {}).get('note', ''))[:120]}}) @register_eval('tau2_bench')