Skip to content

feat(experiments): Expose end-to-end latency metric on Evaluations - #1133

Merged
shanaiabuggy merged 4 commits into
mainfrom
sbuggy/ase-805-expose-end-to-end-serial-latency-metric-on-evaluations
Aug 7, 2026
Merged

feat(experiments): Expose end-to-end latency metric on Evaluations#1133
shanaiabuggy merged 4 commits into
mainfrom
sbuggy/ase-805-expose-end-to-end-serial-latency-metric-on-evaluations

Conversation

@shanaiabuggy

@shanaiabuggy shanaiabuggy commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a first-class end-to-end latency metric to Evaluations: the total time to run an Evaluation's tasks serially. It is the sum of per-test-case latency, where a test case run more than once contributes the average of its attempts. Switchyard requested this for the Experiments leaderboard.

Under the hood this is latency_ms.sum — the rollup already computes latency test-case-weighted (per-attempt → averaged per test case → distribution across test cases), so latency_ms.sum already carries exactly this meaning. This PR names it as a dedicated response field and surfaces it in Studio; no new aggregation was required.

Related Issue

Relates to ASE-805 (Linear).

Changes

  • Intake API: add an end_to_end_latency_ms computed field to EvaluationResponse (= latency_ms.sum), typed nullable (null when no session carries latency).
  • Contract: regenerated OpenAPI (platform specs) and SDKs — Python Optional[float], web number | null.
  • Studio: new sortable + filterable "End-to-end latency" column in the Experiments leaderboard (ExperimentDataView), mapped to the API's latency_ms.sum for sort/filter, plus the reverse default_sort mapping so a saved -latency_ms.sum highlights this column. Null-safe cell.
  • Tests: test_end_to_end_latency.py — the field equals latency_ms.sum and serializes; null when no latency.

Type of Change

  • Code change (feature, bug fix, or refactor)
  • Code change with documentation updates
  • Documentation only
  • Contributor tooling or automation
  • CI, build, or test infrastructure

Quality Gates

  • Tests added or updated for changed behavior
  • Existing tests cover changed behavior — justification:
  • Tests not applicable — justification:
  • Documentation not applicable — justification: the response field carries an inline OpenAPI description; the end-user Intake/Experiments docs live outside this repo.

Verification

  • Pull request title follows the repository's Conventional Commit format
  • Every commit includes an appropriate Signed-off-by: trailer
  • uv run pre-commit run -a passes, or any blocked checks are identified below
  • Targeted tests pass, or tests are marked not applicable above
  • No secrets, API keys, or credentials are included

Targeted validation:

  • uv run --frozen pytest services/intake/tests/test_end_to_end_latency.py -q → 2 passed
  • pnpm --filter nemo-studio-ui typecheck → passes
  • pnpm --filter nemo-studio-ui lint → clean
  • pnpm --filter nemo-studio-ui test src/components/dataViews/ExperimentDataView/util.test.ts → 5 passed

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features
    • Added an end-to-end latency column to experiment data views.
    • Enabled sorting and numeric filtering by latency.
    • Included latency in saved and default view configurations.

Signed-off-by: shanaiabuggy <59746633+shanaiabuggy@users.noreply.github.com>
@shanaiabuggy
shanaiabuggy requested review from a team as code owners August 6, 2026 17:36
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 02e51d22-3b64-4170-a3eb-954d29f01849

📥 Commits

Reviewing files that changed from the base of the PR and between 63142e4 and ba60e4c.

📒 Files selected for processing (1)
  • web/packages/studio/src/components/dataViews/ExperimentDataView/index.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • web/packages/studio/src/components/dataViews/ExperimentDataView/index.tsx

📝 Walkthrough

Walkthrough

Changes

Evaluation latency

Layer / File(s) Summary
Studio latency integration
web/packages/studio/src/components/dataViews/ExperimentDataView/index.tsx
Adds an end-to-end latency column with duration formatting, sorting, numeric filtering, and mappings to the latency_ms.sum API field.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes exposing the end-to-end latency metric on Evaluations, which is the main change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch sbuggy/ase-805-expose-end-to-end-serial-latency-metric-on-evaluations

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the feat label Aug 6, 2026
Signed-off-by: shanaiabuggy <59746633+shanaiabuggy@users.noreply.github.com>
@github-actions

github-actions Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor
Suite Lines Covered Line Rate Branch Rate
Unit Tests 31436/40061 78.5% 63.0%
Integration Tests 18303/38013 48.1% 20.8%

Comment thread services/intake/src/nmp/intake/api/v2/experiments/schemas.py Outdated
…m directly

The computed field was a pure alias for latency_ms.sum with no added
computation, and the frontend already routes the End-to-end latency column's
sort and filter to the latency_ms.sum rollup stat. Remove the response field
(and its OpenAPI/SDK surface) and have the cell read latency_ms.sum directly;
sorting and filtering are unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: shanaiabuggy <59746633+shanaiabuggy@users.noreply.github.com>
@shanaiabuggy
shanaiabuggy added this pull request to the merge queue Aug 7, 2026
Merged via the queue into main with commit 575fe16 Aug 7, 2026
54 checks passed
@shanaiabuggy
shanaiabuggy deleted the sbuggy/ase-805-expose-end-to-end-serial-latency-metric-on-evaluations branch August 7, 2026 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants