Skip to content

fix(terminal_bench): reject invalid trial rewards - #1610

Merged
Yunnglin merged 1 commit into
modelscope:mainfrom
Excelius-Wang:fix/terminal-bench-invalid-reward
Aug 21, 2026
Merged

Yunnglin merged 1 commit into
modelscope:mainfrom
Excelius-Wang:fix/terminal-bench-invalid-reward

Conversation

@Excelius-Wang

Copy link
Copy Markdown
Contributor

Summary

  • reject Terminal-Bench trial results that contain exception_info
  • require verifier_result.rewards.reward to be a finite numeric value in [0, 1]
  • include the trial URI and concise failure context in raised errors
  • add regression coverage for missing, malformed, non-finite, and out-of-range rewards

Previously, malformed Harbor results could be silently converted to acc=0,
which made infrastructure and verifier failures indistinguishable from genuine
benchmark failures and polluted the aggregation denominator.

With this change, scoring raises a sample-level error instead. EvalScope can
then exclude the sample when ignore_errors=True.

Addresses the score-validity portion of #1608.

Tests

  • pytest tests/benchmark/test_terminal_bench.py -q
    • 14 passed
  • pytest tests/benchmark/test_terminal_bench.py tests/benchmark/test_deep_swe.py -q
    • 28 passed, 1 skipped
  • targeted pre-commit checks for both changed files

@Yunnglin
Yunnglin merged commit 3f97484 into modelscope:main Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants