← Back to Pull requests

Run the AL gate on the agentic eval's own server / 在 AgentX 评测自身服务上运行 AL 门禁 #4810

Closed
unknown closed this pull request without merging on Nov 05, 2026 04:54 UTC
View on GitHub
unknown unknown commented on Nov 05, 2026 00:29 UTC
Author

[by Claude Code]

Summary

AgentX throughput forces each speculative deployment's acceptance to its golden AL, and evals cannot see draft quality (speculative decoding is lossless), so a weak drafter goes unnoticed. #4654 measures real AL in separate gate jobs, each with its own server launch. This PR moves that gate into the agentic eval jobs we already run: one server launch serves both the gate and the eval, and the separate gate jobs are removed. The gate stays report-only, so it never fails an eval or blocks a submission.

  • For an agentic eval whose generation role drafts, the srt submission runs benchmarks/srt_al_gate.sh as srt-slurm's benchmark stage, then the eval as its post-benchmark eval, in the same Slurm job. The benchmark stage is the only one that receives the workers' metrics endpoints. The job is submitted with EVAL_ONLY=false RUN_EVAL=true and telemetry off; srt_eval.sh restores EVAL_ONLY=true for the eval. The server keeps real verification, as eval-only servers already do.

  • The planner picks the gate per resolved recipe variant: the curve synthetic acceptance would select for the generation role and its verifier (#4663), the draft length and the golden AL. infx.bench al-gate replays the curve's recorded SPEED-Bench collection at concurrency 64, reads AL = 1 + accepted / verifications from the engine's own Prometheus counters, and writes al_gate_<RESULT_FILENAME>.json with pass (within 5%), below or above. The shim always exits 0, so the eval runs after any outcome.

  • A gate that cannot run is recorded as skipped with its reason: no prompts, a curve without a collection block, TileRT, or leader-only Dynamo vLLM DP metrics. Dynamo TRT-LLM and llm-d are gated: srtctl publishes TRT-LLM metrics by default, and a recipe that turns them off reports no-counters.

  • al-gate-prompts.yml is now also callable: run-sweep.yml and e2e-tests.yml call it to hand the cached prompts to their agentic eval jobs. If it fails, the evals run without the gate and the sweep stays green. collect-evals adds a gate table to its summary.

  • DeepSeek-V4.1-Flash and Muse Spark curves gain collection blocks. DeepSeek-V4.1-Flash was collected with vLLM's deepseek_v41 tokenizer mode, so infx/bench_serving/encoding_dsv41.py copies vLLM's V4.1 encoder from the week of that collection (later vLLM renders reasoning effort high as 75, not 50). Muse Spark was collected by SGLang's bench_serving, which sends no repetition_penalty; the gate replays it on /v1/completions.

  • The gate tests now drive a real Runtime and its bootstrap(), so a wrong bootstrap call or a missing Runtime.aiperf fails them.
  • Removed: run-sweep's al-gate-select, al-gate, al-gate-multinode and al-gate-collect jobs; the templates' al-gate input and gate-only steps; the launcher's AL_GATE request fields and validator, gate_args, check_gate; infx/workflows/al_gate_reuse.py; the gate-job filter in calc_success_rate.py.

    Coverage trade-off: only deployments that run agentic evals are gated; #4654 gated every speculative deployment and drafting configuration.

    Not yet run on a cluster in this form. No config keys change, so there is no perf-changelog entry.

    <details>
    <summary>AI model disclosure</summary>

  • Model/version: claude-opus-5-5 (Claude Code)

  • Role: designed and implemented the in-eval gate on top of #4654's gate code, wrote the tests and documentation, and wrote this description.

  • Model/version: Devin AI (exact model could not be verified)

  • Role: wrote the real-Runtime regression tests in test_al_gate.py, adapted here.
  • </details>

    <details>
    <summary>PR checklist and change type</summary>

    Type of Change

  • Bug fix

  • New feature

  • Configuration change

  • Documentation update

  • Other (please describe)
  • Checklist

  • I have completed the AI model disclosure and kept it current

  • I have tested my changes locally

  • I have updated documentation if necessary

  • If python -m infx.matrix.changed --base origin/main lists affected config keys, I have appended one new entry covering them to the physical end of inferencex-e2e/perf-changelog.yaml; if it lists none, I have added none. I have not edited historical entries

  • If this PR appends an inferencex-e2e/perf-changelog.yaml entry, it carries exactly one primary sweep label (a maintainer applies it on fork PRs): full-sweep-fail-fast (recommended), full-sweep-enabled, or non-canary-full-sweep-enabled. Optional modifiers all-evals, evals-only, and agentx-fast require a primary label; the last two block reuse while applied.

  • Before merging via reuse, an authorized maintainer (OWNER/MEMBER/COLLABORATOR) has commented /use <run_id> (or the legacy /reuse-sweep-run) on this PR. Do this only once there is a final full sweep that is all green with evals passing, since after this comment the primary sweep label will no longer automatically kick off new sweeps. Remove and re-add the primary sweep label to force a new sweep.
  • </details>

    <details>
    <summary>中文</summary>

    AgentX 吞吐量测试会把每个投机解码部署的接受长度强制设为黄金 AL,而评测无法反映草稿质量(投机解码是无损的),因此较弱的草稿模型不会被发现。#4654 在单独的门禁作业中测量真实 AL,每个作业各自启动服务。本 PR 把门禁移入现有的 AgentX 评测作业:门禁与评测共用同一次服务启动,并移除单独的门禁作业。门禁仍仅作报告,不会使评测失败或阻塞提交。

  • 对生成角色启用草稿的 AgentX 评测,srt 提交在同一 Slurm 作业中先以 srt-slurm 基准阶段运行 benchmarks/srt_al_gate.sh,再运行基准后评测。只有基准阶段能拿到各 worker 的指标端点。作业以 EVAL_ONLY=false RUN_EVAL=true 提交并关闭遥测;srt_eval.sh 为评测恢复 EVAL_ONLY=true。服务保持真实验证,与现有仅评测服务一致。

  • 规划器按每个解析后的配方变体选择门禁:与合成接受相同的曲线(按生成角色及其验证器选择,#4663)、草稿长度和黄金 AL。infx.bench al-gate 以并发 64 重放曲线记录的 SPEED-Bench 收集设置,从引擎自身 Prometheus 计数器计算 AL = 1 + accepted / verifications,并写出 al_gate_<RESULT_FILENAME>.json(pass 为偏差 5% 以内,另有 below / above)。脚本总是以 0 退出,评测随后照常运行。

  • 无法运行的门禁以 skipped 记录原因:无提示词、曲线缺少 collection 块、TileRT,或仅暴露 leader 指标的 Dynamo vLLM DP。Dynamo TRT-LLM 与 llm-d 会执行门禁:srtctl 默认发布 TRT-LLM 指标,关闭指标的配方报告 no-counters。

  • al-gate-prompts.yml 现在也可被调用:run-sweep.yml 与 e2e-tests.yml 调用它把缓存的提示词交给 AgentX 评测作业;失败时评测不做门禁,扫描保持成功。collect-evals 在摘要中加入门禁表。

  • DeepSeek-V4.1-Flash 与 Muse Spark 曲线新增 collection 块。DeepSeek-V4.1-Flash 使用 vLLM 的 deepseek_v41 分词器模式采集,因此 infx/bench_serving/encoding_dsv41.py 复制了采集当周 vLLM 的 V4.1 编码器(之后的 vLLM 把推理强度 high 渲染为 75,而不是 50)。Muse Spark 由 SGLang 的 bench_serving 采集,不发送 repetition_penalty;门禁在 /v1/completions 上重放。

  • 门禁测试改用真实的 Runtime 及其 bootstrap(),错误的 bootstrap 调用或缺少 Runtime.aiperf 都会使测试失败。
  • 移除: run-sweep 的 al-gate-select、al-gate、al-gate-multinode、al-gate-collect 作业;模板的 al-gate 输入及门禁专用步骤;启动器的 AL_GATE 请求字段与校验、gate_args、check_gate;infx/workflows/al_gate_reuse.py;calc_success_rate.py 中的门禁作业过滤。

    覆盖范围取舍: 只有运行 AgentX 评测的部署会执行门禁;#4654 会对每个投机解码部署及草稿配置执行门禁。

    该形式的门禁尚未在集群上运行。 没有配置键变化,因此不新增 perf-changelog 条目。

    AI 模型使用说明:claude-opus-5-5(Claude Code)在 #4654 的门禁代码上设计并实现评测内门禁,编写测试与文档,并撰写本说明;Devin AI(无法确认具体模型)编写了 test_al_gate.py 中使用真实 Runtime 的回归测试,本 PR 对其做了改写。

    </details>

    Diff: 650 lines (+487 / -163) across 8 files Reviewer: Ankur-singh Review duration: 264m
    All Vouch review confidence checks passed
    Residual risk 0.25 = Change Risk (0.57) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.57 · 650 lines diff across 8 files
    0.57
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    56%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.388
    Shallow Review Depth shallow_review_depth
    0.289
    Ai Authored ai_authored
    0.050
    Real PR Conversation Timeline
    1 comments
    "Review active on #4810"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 56.8% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 57% (MEDIUM) · Higher = larger blast radius
    57%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 56.8% · Lower = rushed or shallow review
    56.8%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 24.7% · Safe to merge
    24.7%