From 6aeefebffd4108686b73e3a89f2ce906f5af69e9 Mon Sep 17 00:00:00 2001 From: Mika Senghaas Date: Sat, 24 Jan 2026 14:42:41 +0000 Subject: [PATCH] skip scoring if the rollout has an error --- verifiers/rubrics/rubric.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/verifiers/rubrics/rubric.py b/verifiers/rubrics/rubric.py index bfe7973df..664689268 100644 --- a/verifiers/rubrics/rubric.py +++ b/verifiers/rubrics/rubric.py @@ -121,6 +121,10 @@ def func(completion, answer, **kwargs): `` """ + # skip rollout scoring if the rollout has an error + if state.get("error") is not None: + return 0.0 + async def _call(): sig = inspect.signature(func) @@ -179,6 +183,10 @@ async def _call_group_reward_func( Invoke `func` with only the required arguments. """ + # skip group scoring if all states have an error + if all(state.get("error") is not None for state in states): + return [0.0] * len(states) + async def _call(): sig = inspect.signature(func) merged = dict(