← Back to Pull requests

Extend the performance harness and add a nightly regression comparison #283

Open
unknown opened this pull request with 650 lines diff across 8 files
View on GitHub
unknown unknown commented on Dec 01, 2026 03:29 UTC
Author

Stacked on #124 (inference-performance); review that first. This branch is 42 commits ahead of it: the performance harness work done since #124 left it, a nightly comparison built on that harness, and one merge that brings #124's latest state in.

Original problem

The performance workflow measured a candidate against a baseline on one Metal host, with one fixed scenario, once. Nothing compared main with itself over time, so a change that slowed Skippy reached main unnoticed unless someone ran a comparison by hand, and the numbers lived in artifacts that expire.

With this change, maintainers can:

  • run comparisons on GB10 CUDA, x86 CUDA and ROCm hosts as well as Metal, against a branch of this repository as well as a commit or an open PR;

  • name the scenario servers to run, run a server with its own Skippy flags as a variant, send requests at a fixed rate, and replay recorded AgentX and ShareGPT conversations;

  • see llama.cpp's server at both pins when a change moves the pin, so a regression llama.cpp shares is attributed to it;

  • follow a running job's progress step by step, and find every server log and AIPerf export beside the evidence;

  • get a nightly run that compares main with the commit the last successful nightly measured, fails on a regression in Skippy, and records each night in MLflow.
  • Fix

    Harness (33 commits): a backend table with GB10 CUDA, x86 CUDA and ROCm entries; branch arms; named servers, variants and server comparisons; rate points; conversation replay capped at each model's trained context, which is pinned in ci/inference-artifacts.json and refused at planning when a replay cannot fit; llama-server at both pins; jobs run as steps that report progress; logs and AIPerf exports kept with the evidence; and fixes found running it on the lab's hosts.

    Recipe identity (159fcae4): pinning trained_context changed the recipe hash of every qualification configuration, so the audited history in ci/inference-comparability.json stopped matching. The recipe now hashes a model's manifest entry without that field, which restores all 52 audited identities. The field follows from the pinned files and is checked against them at admission.

    Nightly (7 commits): inference-performance-nightly.yml runs at 11:07 UTC from protected main. Each lane in ci/inference-performance-nightly.json is one model on one pinned node: two Macs, a GB10 and an x86 CUDA host. Every lane measures tonight's head against the head of the last successful nightly, with llama-server at each commit's pin. The first night and a rebaseline dispatch measure main against itself.

  • Report (no credentials) checks each job's evidence against its plan: node, every arm at every point each round, settings applied, output length, metrics present, rejections only where llama-server's pool cannot hold the point. It then compares cell by cell. A regression is worse than the shared 1% tolerance with round ranges that do not overlap; it is llama.cpp's when the pin moved and llama-server lost as much.

  • Record alone holds the tracking credentials, in the inference-records environment, and runs no measured code. It writes each lane's job in the existing view layout (arm.role, <field>/<point> medians, current and trend runs) and the night as its own run. It prints no server, experiment or run address: the client's run links are switched off and its output is redacted.

  • Verdict fails the night for an unfinished lane, evidence that did not hold, a Skippy regression, or a night not recorded. A failed night leaves the baseline at the last commit that passed.
  • Merge (6eb5478a): #124 hardened its controller after this branch left it, and ten files conflicted. Two resolutions need a look:

  • Process groups: #124's group_alive raises on EPERM while the child still runs; this branch treats that EPERM as Darwin's answer for an exiting group and checks ps for a running process of ours. The merge keeps this branch's reading, because raising failed Metal teardown, and #124's three ci_process_contracts.py tests now use the uid-aware rows and expect the check.

  • Controller tests: #124's performance_controller_contracts.py tested the one-shot execute this branch replaced with steps. Those three tests now test the steps: a failed trace step is reported and the job goes on, a failed round fails it, and a failed job's logs are kept.
  • git show --remerge-diff 6eb5478a shows only the resolutions.

    Workflow diagrams

    inference-performance.yml

    Before (#124):

    flowchart LR
      T["workflow_dispatch / workflow_call<br/>candidate, baseline, reference, models, nodes, rounds, trace"] --> M["measure<br/>admit, dispatch JY jobs, collect"]
      M --> A[("artifact<br/>inference-performance-RUN-ATTEMPT")]
    

    After:

    flowchart LR
      T["workflow_dispatch / workflow_call<br/>+ backend, servers; call adds label"] --> M["measure<br/>admit for the backend, dispatch JY jobs as steps, collect"]
      M --> A[("artifact<br/>inference-performance-LABEL-RUN-ATTEMPT")]
    

    inference-performance-nightly.yml

    Before: no such workflow.

    After:

    flowchart LR
      S["schedule 11:07 UTC<br/>or dispatch, optional rebaseline"] --> P["plan<br/>protected main only<br/>baseline = last successful nightly's head"]
      P -->|"mode != unchanged"| M["measure, one call per lane<br/>inference-performance.yml"]
      M --> E[("lane evidence artifacts")]
      E --> R["report<br/>no credentials<br/>checks evidence, compares cells"]
      R --> N[("nightly artifact, 90 days")]
      E --> C["record<br/>environment inference-records<br/>MLflow"]
      N --> C
      P --> V["verdict<br/>fails on regression, unverified lane,<br/>failed step or missing record"]
      M --> V
      R --> V
      C --> V
    

    Compatibility

    Qualification recipe identities are unchanged from the audited ones. The performance workflow's existing inputs keep their meaning; backend defaults to Metal. The record layout matches the existing view's.

    Validation

  • just ci-automation on 6eb5478a: passed locally (macOS, Python 3.12).

  • A synthetic night recorded with the real MLflow client into a scratch experiment and read back: 32 of 32 checks, including that the recording script's output names no server, run address, account or token.

  • Not run yet: the nightly workflow itself (it runs only from main) and any lab job on the merged code. No performance claim is made here.
  • Before the nightly can run, an inference-records environment needs SKIPPY_MLFLOW_TRACKING_URI, SKIPPY_MLFLOW_TRACKING_USERNAME, SKIPPY_MLFLOW_TRACKING_PASSWORD and SKIPPY_MLFLOW_EXPERIMENT, ideally for a service account rather than a person.

    Acceptance criteria

  • I ran the relevant local checks, or explained why they do not apply.

  • I agree to license my contributions under the Apache License, Version 2.0.
  • <!-- This is an auto-generated comment: release notes by coderabbit.ai -->

    <!-- coderabbit-ai-generated:v1 -->

    Summary by CodeRabbit

    New Features
    Added nightly inference performance comparisons across configured hardware and model lanes, with reports, regression checks, and experiment tracking.
    Expanded performance comparisons to support Metal, CUDA, and ROCm backends, branch-based candidates and baselines, selectable servers, and conversation datasets.
    Added richer benchmark results, including rejected-request counts, memory details, and host information.
    Added model context information and new benchmark scenarios.

    Documentation
    Updated performance workflow guides with backend options, nightly comparisons, and reporting behavior.

    Tests
    * Added coverage for nightly comparisons, backend and workload options, reporting, and process handling.

    <!-- end of auto-generated comment: release notes by coderabbit.ai -->

    Diff: 650 lines (+487 / -163) across 8 files Reviewer: jaredwy Review duration: 762m
    All Vouch review confidence checks passed
    Residual risk 0.30 = Change Risk (0.52) × (1 − Review Confidence (0.43)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.52 · 650 lines diff across 8 files
    0.52
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.02 · 1 substantive comment(s)
    0.02
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    42%
    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.344
    Real PR Conversation Timeline
    1 comments
    "Review active on #283"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 43.0% 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: 52% (MEDIUM) · Higher = larger blast radius
    52%
    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: 43.0% · Lower = rushed or shallow review
    43.0%
    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: 29.7% · Safe to merge
    29.7%