Skip to content

feat(agentx): let a declared deviation be graded for A/B without becoming submittable - #1743

Closed
rpoornac wants to merge 1 commit into
mainfrom
feat/agentx-noncanonical-ab-grading
Closed

rpoornac wants to merge 1 commit into
mainfrom
feat/agentx-noncanonical-ab-grading

Conversation

@rpoornac

@rpoornac rpoornac commented Oct 1, 2026

Copy link
Copy Markdown
Collaborator

Description

is_valid_measurement refuses any AgentX measurement stamped submission_valid=False. That refusal is load-bearing — it is what stops a shortened smoke from being read as a leaderboard number — and it stays the default here.

But the stamp is applied to every run on a deviating workload, including the smoke that search is meant to run on. So the refusal also rejects the A/B the smoke exists for: a variant measured on 150 trajectories cannot be compared against a baseline measured on 150 trajectories, because both are non-canonical. The result is a session that spends its budget producing measurements it then discards.

Measured on a Kimi-K3 agentic session:

  • The 150-trajectory baseline produced a healthy report (26.60 tok/s, 3,172 completed, 0% errors) and the variant produced one too (24.39 tok/s, 3,150 completed).
  • The variant round was nonetheless aborted: benchmark_report_invalid_metric (rc=0): benchmark_report missing valid throughput/completed requests, with a complete report on disk written 31s before the abort.
  • The only gradeable workload was the canonical 613-trajectory set, at ~33h per round — which makes an optimization loop impractical.

What this changes

HYPERLOOM_ALLOW_NONCANONICAL_MEASUREMENT lets a declared deviation be graded. It buys comparability and nothing else:

  • submission_valid stays False in the result and submission_invalid_reasons travel with it, so no artifact becomes submittable.
  • An unknown verdict (None) is still refused; that is a different claim from declared-and-deviating, and keeps its own existing knob.
  • Default behaviour is unchanged.

Observable effect

With the opt-in set, a session can search on a reduced workload and have its variants graded against a like-for-like baseline. Without it, nothing changes.

Test plan

  • test_agentx_budget_and_guards.py — 38 passed, including three new cases: opt-in grades a declared deviation while leaving the verdict False, the opt-in does not admit an unknown verdict, and the default still refuses
  • Wider selection (-k 'benchmark_result or agentx or grid_runner or valid_measurement') — 849 passed, 2 skipped (one pre-existing failure in test_agentx_repair.py reproduces on a clean tree)

Breaking changes: no. PR addresses single concern: yes.

Made with Cursor

…ming submittable

Refusing a measurement stamped submission_valid=False is what stops a short smoke from being read as a leaderboard number, and that stays the default. The same refusal also blocks the search the smoke exists for: every candidate on a deviating workload carries the stamp, so no variant is comparable to a baseline measured the same way, and a session spends its budget on verdicts it discards. Measured on Kimi-K3 agentic: the only gradeable workload was the canonical 613-trajectory set at ~33h per round, and a 150-trajectory variant round aborted as benchmark_report_invalid_metric with a healthy report on disk. HYPERLOOM_ALLOW_NONCANONICAL_MEASUREMENT buys grading and nothing else -- the verdict stays False, its reasons travel with it, and an unknown verdict is still refused.

Co-authored-by: Cursor <cursoragent@cursor.com>
@rpoornac
rpoornac requested a review from a team as a code owner October 1, 2026 14:21
@rpoornac
rpoornac marked this pull request as draft October 14, 2026 17:37
@chaojhou

Copy link
Copy Markdown
Collaborator

Closing this one because main has moved past what it changes. #1922 (merged as 75df551) replaced the AIPerf AgentX client with Magpie's native AgentX contract. It removed aiperf_client.sh, aiperf_phase_gate.py and map_aiperf.py, along with the agentx_enabled() / submission_valid verdict branch in is_valid_measurement that this PR edits. On main, is_valid_measurement (orchestrator/actions/executors/benchmark_result.py around line 822) refuses submission_valid is False outright and decides native AgentX validity from Magpie's benchmark_valid / diagnostic_only. The verdict-gate tests this PR adds alongside are gone from test_agentx_budget_and_guards.py, and the branch now conflicts. If grading on a reduced workload is still needed under native Magpie, a new PR designed against Magpie's validity fields would be the way to do it. Thanks for the detailed measurements in the description.

@chaojhou chaojhou closed this Oct 22, 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