E537 Enhance per step profiling with more request-level metrics by Weili-0234 · Pull Request #25 · ThunderAgent-org/ThunderAgent · GitHub
[go: up one dir, main page]

Skip to content

Enhance per step profiling with more request-level metrics#25

Open
Weili-0234 wants to merge 2 commits intoThunderAgent-org:mainfrom
Weili-0234:feat/enhanced-profile
Open

Enhance per step profiling with more request-level metrics#25
Weili-0234 wants to merge 2 commits intoThunderAgent-org:mainfrom
Weili-0234:feat/enhanced-profile

Conversation

@Weili-0234
Copy link
Collaborator

Summary

This PR enhances ThunderAgent profiling with token-level step metrics.

Added features

  • Per-step CSV now records:
    • prompt_tokens
    • completion_tokens
    • cached_tokens
  • Profile API outputs now include:
    • avg_prompt_tokens
    • avg_completion_tokens
    • avg_cached_tokens
  • Usage parsing/callback flow is extended to propagate these token fields end-to-end.
  • Existing finalize behavior is preserved (token stats are finalized when usage.total_tokens is available).

Docs

  • Updated wiki/Profiling-and-Metrics.md
  • Updated wiki/API-Reference.md

Validation

Verified locally with Qwen/Qwen3-0.6B on both vLLM and SGLang backends

In both cases, the new token fields were correctly written to step_profiles.csv and reflected in profile API averages.

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

0