Skip to content

log reponse for debugging#4592

Merged
lvhan028 merged 3 commits into
InternLM:mainfrom
lvhan028:feat/response-log-level
May 21, 2026
Merged

log reponse for debugging#4592
lvhan028 merged 3 commits into
InternLM:mainfrom
lvhan028:feat/response-log-level

Conversation

@lvhan028
Copy link
Copy Markdown
Collaborator

No description provided.

Copilot AI review requested due to automatic review settings May 18, 2026 04:36
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds request response logging to the async generation path for debugging, extending the existing request logging utility.

Changes:

  • Collects generated response chunks during async generation.
  • Adds RequestLogger.log_response() to emit the generated response at request log level.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
lmdeploy/serve/core/async_engine.py Collects generated chunks and logs the response after generation.
lmdeploy/logger.py Adds response logging support to RequestLogger.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

output_len, gen_len = 0, 0
state = DetokenizeState(input_len)
response = ''
response_chunks = []
Comment thread lmdeploy/logger.py
@lvhan028 lvhan028 requested a review from CUHKSZzxy May 18, 2026 06:02
@lvhan028 lvhan028 merged commit 60eaa03 into InternLM:main May 21, 2026
5 checks passed
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.

3 participants