Skip to content

[staging] Manual import: generate per-turn rows from multi-turn benchmarks - #106

Open
aas008 wants to merge 4 commits into
openshift-psap:stagingfrom
aas008:feat/manual-import-per-turn-staging
Open

aas008 wants to merge 4 commits into
openshift-psap:stagingfrom
aas008:feat/manual-import-per-turn-staging

Conversation

@aas008

@aas008 aas008 commented Oct 7, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Continuation of #104 for the staging branch. Adds per-turn row generation to the manual import script — same changes as #105 targeting main.

PR #104 merged the basic turn_index column addition; this PR brings the actual per-turn row generation that makes manual imports produce the same output as the Forge pipeline.

Changes

import_manual_runs_json_v2.py

  • _percentile(), _median(), _mean(), _sorted_field() helpers aligned with Forge PR #215
  • extract_per_turn_rows() — emits per-turn rows from requests.successful[].turn_index
  • turn_index added to fieldnames export list
  • Single-turn guard: no per-turn rows for single-turn runs

README.md — per-turn row behaviour documented

Test results

Multi-turn (3 turns × 2 concurrencies): 2 aggregate + 6 per-turn rows ✅
Standard (no turn_index data): 3 aggregate rows only, unchanged behaviour ✅

🤖 Generated with Claude Code

aas008 and others added 3 commits October 7, 2026 11:43
…ndex data

When the guidellm JSON contains requests.successful with turn_index fields
(multi-turn benchmarks), the script now emits:
  - one aggregate row per concurrency level (turn_index = empty, unchanged)
  - one per-turn row per turn per concurrency level (turn_index = 0, 1, 2, …)

Per-turn rows carry the same metadata as the aggregate row plus per-turn
stats: TTFT/ITL/TPOT median+p95+p99+p1+p999+mean, request latency, output
throughput, token counts. Benchmarks without turn_index data are unaffected.

Add _percentile() helper and extract_per_turn_rows() function.
Update README to clarify that per-turn rows are now emitted automatically.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
The turn_index key was added to the result dict but missing from the
fieldnames list passed to combined_df[fieldnames], so pandas silently
dropped it. CSV output now has 53 columns as the README states.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
- _percentile(): use same k/f/c linear interpolation as Forge
- Add _median(), _mean(), _sorted_field() helpers matching Forge's
  _turn_metric_values() helpers exactly
- Add len(all_turns) <= 1 guard: skip per-turn extraction for single-turn
  runs (matches Forge PR #215 behavior)
- Replace _percentile(50) calls with _median() for correctness

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 84ca467f-3923-4454-8f62-5113e206082c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

…ment-id flags

When provided, these values are stamped on every output row and included
in the fieldnames list so the dashboard's Filtered Data table renders
a clickable MLflow artifact link (added to the schema in PR openshift-psap#83).

Both flags are optional and default to empty string — no breaking change.

Closes openshift-psap#107

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
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