Skip to content

fix(agentx): use full-response interactivity - #677

Open
cquil11 wants to merge 2 commits into
masterfrom
agent/agentx-full-response-tps-migration
Open

fix(agentx): use full-response interactivity#677
cquil11 wants to merge 2 commits into
masterfrom
agent/agentx-full-response-tps-migration

Conversation

@cquil11

@cquil11 cquil11 commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • prefer request_metrics.latency.full_response_itl and derive canonical AgentX interactivity from its matching latency percentile
  • reconstruct full-response ITL from retained AIPerf profiles when older aggregate artifacts do not contain the new metric
  • add an idempotent data-backfill command for existing AgentX rows
  • keep artifact overlays and worker-thread ingest on the same metric definition

Calculation

For each legacy request:

full_response_itl = (request_lifecycle_duration - TTFT) / (OSL - 1)
full_response_interactivity = 1 / full_response_itl

The aggregate-provided metric remains authoritative when present. Namespaced fields are retained for provenance, while canonical *_itl and *_intvty fields drive existing charts.

Validation

  • focused database and frontend tests: 165 passed
  • lint, formatting, and typecheck: passed
  • production backfill: 470/470 AgentX rows updated, 0 failures, 0 remaining candidates
  • production reciprocal audit: 0 mismatches

Dependencies and merge order

  1. feat: add full-response ITL and output throughput aiperf#36
  2. feat(agentx): aggregate full-response ITL and interactivity InferenceX#2504
  3. This PR

Note

Medium Risk
Changes how agentic ITL/interactivity are computed and stored across ingest, DB backfill, and chart transforms—dashboard numbers shift for agentic runs but logic is covered by unit tests and an idempotent backfill.

Overview
Agentic charts and stored metrics now treat full-response inter-token latency as canonical ITL, with interactivity derived as 1 / p(ITL) for each percentile. New aggregate artifacts supply *_full_response_itl / *_full_response_intvty; ingest maps those onto canonical *_itl and *_intvty and drops unmatched legacy percentiles so rows never mix timing domains.

A shared full-response-interactivity ETL module reconstructs the same definition for older runs from gzipped AIPerf profiles: (request lifecycle − TTFT) / (OSL − 1), with optional explicit profile fields and warmup/error filtering. Trace-replay ingest computes this during prepareTraceReplay and merges into benchmark_results.metrics when median_full_response_itl is absent. admin:db:backfill-full-response-interactivity applies the same logic to historical agentic rows that still have profiles.

Frontend overlays (applyAgenticMetricAliases in benchmark-transform.ts) mirror ingest so ?unofficialrun= rows match DB-backed charts. v3 flattening and METRIC_KEYS register the namespaced full-response fields for provenance.

Reviewed by Cursor Bugbot for commit 7f397f5. Bugbot is set up for automated code reviews on this repo. Configure here.

@vercel

vercel Bot commented Aug 5, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
inferencemax-app Ready Ready Preview Aug 5, 2026 9:03pm

Request Review

@cquil11

cquil11 commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

Read-only validation against real artifacts from InferenceX run 30425131777, attempt 3:

  • B300 Kimi K3 c1, no offload: 263/263 profiling requests reconstructed; legacy p75 interactivity 2,129.14 TPS -> full-response p75 166.60 TPS
  • B300 Kimi K3 c1, DRAM KV offload: 263/263 requests reconstructed; median 175.42 TPS, p75 166.37 TPS
  • B300 Kimi K3 c16, no offload: 250/250 requests reconstructed; median 9.50 TPS, p75 5.66 TPS

The original c1 artifact contains an individual request reported as 488,683 TPS by the mixed-domain metric; the fallback reconstructs 182.64 TPS from its 145.999-second lifecycle, 0.523-second TTFT, and 26,571 output tokens.

Validation called prepareTraceReplay() directly on the downloaded profile_export.jsonl, server_metrics_export.csv, and server_metrics_export.json files. It exercised compression, trace-derived payload generation, and the full-response fallback without opening a database connection or ingesting any rows.

@cquil11

cquil11 commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

Completed a read-only audit of every current production AgentX submission after running the idempotent migration command.

  • 470/470 rows already migrated; 0 remaining candidates
  • 470/470 retained profiles comparable; 0 unusable rows
  • 1,751,973 matched profiling requests compared directly
  • comparison used raw per-request legacy inter_token_latency versus reconstructed full-response ITL, then 1 / p75(ITL) on each side

Non-Kimi-K3 results (454 submissions):

  • median absolute TPS change: 0.000003%
  • p95 absolute change: 0.045%
  • p99 absolute change: 0.158%
  • maximum absolute change: 0.265%
  • submissions over 1% change: 0

The only material differences were 10 of 16 Kimi-K3 submissions from InferenceX run 30425131777 attempt 3. Their median change was -71.3%, with the largest correction from 2,129.14 TPS to 167.03 TPS (-92.15%). The other six Kimi-K3 points did not exceed 1%.

An initial comparison against stored TPOT made several DeepSeek V4 rows look different, but that was not a valid proxy for legacy ITL. Direct raw-profile comparison showed DeepSeek V4 has a 0.229% worst-case change and no row above 1%. No database writes were performed by the audit.

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.

1 participant