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

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. models.py +1 -1
  2. server/rewards.py +4 -2
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.0001
 
109
  correct_reports: int = 0
110
  false_positives: int = 0
111
  duplicate_reports: int = 0
112
+ score: float = 0.01
server/rewards.py CHANGED
@@ -92,7 +92,8 @@ def compute_step_reward(
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,
@@ -169,4 +170,5 @@ def compute_episode_score(correct_count: int, total_violations: int) -> float:
169
  if total_violations == 0:
170
  return 0.5
171
  raw = correct_count / total_violations
172
- return round(max(0.0001, min(0.9999, raw)), 4)
 
 
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
+ # Use 0.01/0.99 so value is still non-zero/non-one after :.2f formatting
96
+ bonus = round(max(0.01, min(0.99, bonus)), 4)
97
  return RewardBreakdown(
98
  reward=bonus,
99
  is_correct=False,
 
170
  if total_violations == 0:
171
  return 0.5
172
  raw = correct_count / total_violations
173
+ # Use 0.01/0.99 so value is still non-zero/non-one after :.2f formatting
174
+ return round(max(0.01, min(0.99, raw)), 4)