pushpam14 commited on
Commit
abe58f7
·
verified ·
1 Parent(s): 63c4b56

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. models.py +1 -1
  2. server/rewards.py +3 -1
models.py CHANGED
@@ -109,4 +109,4 @@ class ValidatorState(State):
109
  correct_reports: int = 0
110
  false_positives: int = 0
111
  duplicate_reports: int = 0
112
- score: float = 0.0
 
109
  correct_reports: int = 0
110
  false_positives: int = 0
111
  duplicate_reports: int = 0
112
+ score: float = 0.0001
server/rewards.py CHANGED
@@ -91,8 +91,10 @@ def compute_step_reward(
91
  if is_done_signal:
92
  completeness = correct_so_far / max(total_violations, 1)
93
  bonus = DONE_BONUS_MULTIPLIER * completeness
 
 
94
  return RewardBreakdown(
95
- reward=round(bonus, 4),
96
  is_correct=False,
97
  is_path_match=False,
98
  is_duplicate=False,
 
91
  if is_done_signal:
92
  completeness = correct_so_far / max(total_violations, 1)
93
  bonus = DONE_BONUS_MULTIPLIER * completeness
94
+ # Clamp to strictly (0, 1) — evaluator requires score never equals 0.0 or 1.0
95
+ bonus = round(max(0.0001, min(0.9999, bonus)), 4)
96
  return RewardBreakdown(
97
+ reward=bonus,
98
  is_correct=False,
99
  is_path_match=False,
100
  is_duplicate=False,