Imaginephoenix commited on
Commit
3ac18e2
·
verified ·
1 Parent(s): 496c5c4

Update inference.py

Browse files
Files changed (1) hide show
  1. inference.py +3 -3
inference.py CHANGED
@@ -23,7 +23,7 @@ MAX_STEPS = 30
23
  TEMPERATURE = 0.2
24
  MAX_TOKENS = 200
25
  SUCCESS_SCORE_THRESHOLD = 0.5
26
- LOG_SCORE_EPSILON = 1e-6
27
  DEFAULT_RUNTIME_BUDGET_SECONDS = int(os.getenv("INFERENCE_RUNTIME_BUDGET_SECONDS", "1140"))
28
  DEFAULT_REQUEST_TIMEOUT_SECONDS = float(os.getenv("INFERENCE_REQUEST_TIMEOUT_SECONDS", "12"))
29
 
@@ -123,9 +123,9 @@ def log_start(task_name: str, benchmark_name: str, model_name: str) -> None:
123
 
124
 
125
  def _format_open_score(value: float) -> str:
126
- """Format scores without collapsing strict-open values to 0.00 or 1.00."""
127
  clamped = max(LOG_SCORE_EPSILON, min(1.0 - LOG_SCORE_EPSILON, float(value)))
128
- return f"{clamped:.6f}"
129
 
130
 
131
  def log_step(step: int, action_str: str, reward: float, done: bool, error: str | None) -> None:
 
23
  TEMPERATURE = 0.2
24
  MAX_TOKENS = 200
25
  SUCCESS_SCORE_THRESHOLD = 0.5
26
+ LOG_SCORE_EPSILON = 1e-2
27
  DEFAULT_RUNTIME_BUDGET_SECONDS = int(os.getenv("INFERENCE_RUNTIME_BUDGET_SECONDS", "1140"))
28
  DEFAULT_REQUEST_TIMEOUT_SECONDS = float(os.getenv("INFERENCE_REQUEST_TIMEOUT_SECONDS", "12"))
29
 
 
123
 
124
 
125
  def _format_open_score(value: float) -> str:
126
+ """Format scores in strict-open range while preserving .2f log contract."""
127
  clamped = max(LOG_SCORE_EPSILON, min(1.0 - LOG_SCORE_EPSILON, float(value)))
128
+ return f"{clamped:.2f}"
129
 
130
 
131
  def log_step(step: int, action_str: str, reward: float, done: bool, error: str | None) -> None: