Skip to content

feat(swe-bench): pre-dispatch gates that must prove their own scale - #473

Open
arekay-nv wants to merge 1 commit into
swe-layer-4from
swe-layer-5
Open

feat(swe-bench): pre-dispatch gates that must prove their own scale#473
arekay-nv wants to merge 1 commit into
swe-layer-4from
swe-layer-5

Conversation

@arekay-nv

Copy link
Copy Markdown
Collaborator

What does this PR do?

Type of change

  • Bug fix
  • New feature
  • Documentation update
  • Refactor/cleanup

Related issues

Testing

  • Tests added/updated
  • All tests pass locally
  • Manual testing completed

Checklist

  • Code follows project style
  • Pre-commit hooks pass
  • Documentation updated (if needed)

Stack created with GitHub Stacks CLIGive Feedback 💬

run_gates() calls assert_scale() before check() and treats GateScaleError as
a gate FAILURE, never a skip. This is the code-level form of the most
expensive lesson available: a tool-call gate that exercised the right
operation at a 278-token prompt passed, while prompts over 2k tokens
silently returned empty, and the run scored 0/80.

- CheckpointIdentityGate probes /get_model_info then /v1/models and compares
  the served model path with == , never startswith or in: the bf16 path is a
  strict prefix of the fp8 path, so any substring test passes an FP8 engine
  as bf16. Unidentifiable or ambiguous endpoints fail closed.
- ToolCallGate requires a well-formed bash tool call at a prompt of at least
  min_prompt_tokens measured with the server's own /tokenize, not estimated
  from characters. No tokenizer means the gate cannot prove its scale, so it
  fails.
- EndpointFingerprintGate records a per-endpoint identity the dispatcher
  re-checks at publish time, so an engine restarted under a live client
  cannot yield a 0%-accuracy run that still exits rc=0.
@arekay-nv
arekay-nv requested a review from a team as a code owner August 26, 2026 03:32
@github-actions
github-actions Bot requested a review from nvzhihanj August 26, 2026 03:32
@github-actions

Copy link
Copy Markdown

MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅

@github-actions github-actions Bot added the size/normal PR Review Policy: <=500 non-test lines & <=20 files label Aug 26, 2026

def assert_scale(self, targets: list[str]) -> None:
"""Prove this gate tests what it claims. Raise :class:`GateScaleError`."""
...
"""Prove this gate tests what it claims. Raise :class:`GateScaleError`."""
...

def check(self, targets: list[str]) -> GateReport: ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/normal PR Review Policy: <=500 non-test lines & <=20 files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants