Skip to content

[None][chore] Remove trailing spaces from module name in logger output#14122

Merged
nv-guomingz merged 1 commit into
NVIDIA:mainfrom
nv-guomingz:user/guomingz/remove_additional_space
May 20, 2026
Merged

[None][chore] Remove trailing spaces from module name in logger output#14122
nv-guomingz merged 1 commit into
NVIDIA:mainfrom
nv-guomingz:user/guomingz/remove_additional_space

Conversation

@nv-guomingz
Copy link
Copy Markdown
Collaborator

@nv-guomingz nv-guomingz commented May 14, 2026

The output log now displays as below

[05/14/2026-07:06:30] [TRT-LLM] [I] [llmapi] Using LLM with PyTorch backend
[05/14/2026-07:06:30] [TRT-LLM] [W] [llmapi] Using default gpus_per_node: 4

Summary by CodeRabbit

  • Style
    • Refined logging output formatting to eliminate fixed-width padding from module name prefixes. Log messages now display module names more compactly without alignment padding, resulting in cleaner, more concise log output across logging systems.

Review Change Stack

@nv-guomingz
Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

Comment thread cpp/include/tensorrt_llm/common/logger.h
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 14, 2026

📝 Walkthrough

Walkthrough

The pull request removes fixed-width padding from module name prefixes in logging output. The C++ Logger's getPrefix() method changes from %-8.*s to %.*s formatting, and the Python Logger's _format_module() helper removes .ljust() padding. Documentation in both is updated to reflect the new unpadded behavior.

Changes

Module prefix formatting

Layer / File(s) Summary
C++ Logger module prefix format
cpp/include/tensorrt_llm/common/logger.h
Logger::getPrefix() changes formatting from %-8.*s (left-padded) to %.*s (unpadded) for module-tagged messages. Documentation comment updated to match.
Python Logger module prefix format
tensorrt_llm/logger.py
_format_module() removes .ljust() right-padding from abbreviated module names and returns only the truncated substring. Docstring updated.

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is incomplete, providing only example output without explaining the issue, solution, test coverage, or addressing the PR checklist items required by the template. Add sections for Description, Test Coverage, and complete the PR Checklist to explain the rationale, testing strategy, and confirm compliance with coding guidelines.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: removing trailing spaces from module names in logger output, which is reflected in both C++ and Python logger modifications.
Docstring Coverage ✅ Passed Docstring coverage is 80.00% which is sufficient. The required threshold is 80.00%.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@cpp/include/tensorrt_llm/common/logger.h`:
- Around line 299-310: The fallback module label used by extractModule()
contains leading spaces (e.g. "  others") which, when passed to getPrefix(Level,
std::string_view) using the "%.*s" formatting, still produces unwanted
padded-looking output; change the fallback to a clean label without leading
spaces (e.g. "others") or trim leading whitespace from the module string before
calling getPrefix, so getPrefix(...) and the static inline getPrefix(Level,
std::string_view, int) receive an unpadded module name.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: b02784ad-60d2-47a5-9406-d999794e19a3

📥 Commits

Reviewing files that changed from the base of the PR and between 8fdce1c and 24cec58.

📒 Files selected for processing (2)
  • cpp/include/tensorrt_llm/common/logger.h
  • tensorrt_llm/logger.py

Comment thread cpp/include/tensorrt_llm/common/logger.h Outdated
@nv-guomingz nv-guomingz force-pushed the user/guomingz/remove_additional_space branch from 24cec58 to 29f370e Compare May 14, 2026 07:14
@tensorrt-cicd
Copy link
Copy Markdown
Collaborator

PR_Github #48323 [ run ] triggered by Bot. Commit: 29f370e Link to invocation

@nv-guomingz nv-guomingz force-pushed the user/guomingz/remove_additional_space branch from 29f370e to f77b3f0 Compare May 14, 2026 07:16
@nv-guomingz nv-guomingz enabled auto-merge (squash) May 14, 2026 07:16
@tensorrt-cicd
Copy link
Copy Markdown
Collaborator

PR_Github #48323 [ run ] completed with state SUCCESS. Commit: 29f370e
/LLM/main/L0_MergeRequest_PR pipeline #38131 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@nv-guomingz
Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd
Copy link
Copy Markdown
Collaborator

PR_Github #48519 [ run ] triggered by Bot. Commit: f77b3f0 Link to invocation

@tensorrt-cicd
Copy link
Copy Markdown
Collaborator

PR_Github #48519 [ run ] completed with state FAILURE. Commit: f77b3f0
/LLM/main/L0_MergeRequest_PR pipeline #38313 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@nv-guomingz nv-guomingz force-pushed the user/guomingz/remove_additional_space branch 2 times, most recently from c805055 to f8a42ee Compare May 17, 2026 03:57
@nv-guomingz
Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@github-actions
Copy link
Copy Markdown

⚠️ Bot command ignored: The /bot command must appear at the very beginning of the comment (no leading blank lines or spaces). Please post a new comment with /bot as the first character.

@nv-guomingz
Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@nv-guomingz nv-guomingz force-pushed the user/guomingz/remove_additional_space branch from f8a42ee to 78c39d2 Compare May 18, 2026 03:02
@nv-guomingz
Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd
Copy link
Copy Markdown
Collaborator

PR_Github #48816 [ run ] triggered by Bot. Commit: 78c39d2 Link to invocation

@tensorrt-cicd
Copy link
Copy Markdown
Collaborator

PR_Github #48816 [ run ] completed with state ABORTED. Commit: 78c39d2
/LLM/main/L0_MergeRequest_PR pipeline #38578 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@nv-guomingz nv-guomingz force-pushed the user/guomingz/remove_additional_space branch 2 times, most recently from 638c7b7 to f409001 Compare May 18, 2026 14:06
@nv-guomingz
Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd
Copy link
Copy Markdown
Collaborator

PR_Github #48920 [ run ] triggered by Bot. Commit: f409001 Link to invocation

@tensorrt-cicd
Copy link
Copy Markdown
Collaborator

PR_Github #48920 [ run ] completed with state SUCCESS. Commit: f409001
/LLM/main/L0_MergeRequest_PR pipeline #38669 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@nv-guomingz
Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd
Copy link
Copy Markdown
Collaborator

PR_Github #49026 [ run ] triggered by Bot. Commit: f409001 Link to invocation

@tensorrt-cicd
Copy link
Copy Markdown
Collaborator

PR_Github #49026 [ run ] completed with state SUCCESS. Commit: f409001
/LLM/main/L0_MergeRequest_PR pipeline #38764 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

Signed-off-by: nv-guomingz <137257613+nv-guomingz@users.noreply.github.com>
@nv-guomingz nv-guomingz force-pushed the user/guomingz/remove_additional_space branch from f409001 to 834dfa0 Compare May 19, 2026 06:47
@nv-guomingz
Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd
Copy link
Copy Markdown
Collaborator

PR_Github #49124 [ run ] triggered by Bot. Commit: 834dfa0 Link to invocation

@tensorrt-cicd
Copy link
Copy Markdown
Collaborator

PR_Github #49124 [ run ] completed with state SUCCESS. Commit: 834dfa0
/LLM/main/L0_MergeRequest_PR pipeline #38824 completed with status: 'FAILURE'

CI Report

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

CI Agent Failure Analysis

Link to invocation

@nv-guomingz
Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd
Copy link
Copy Markdown
Collaborator

PR_Github #49274 [ run ] triggered by Bot. Commit: 834dfa0 Link to invocation

@tensorrt-cicd
Copy link
Copy Markdown
Collaborator

PR_Github #49274 [ run ] completed with state SUCCESS. Commit: 834dfa0
/LLM/main/L0_MergeRequest_PR pipeline #38938 completed with status: 'SUCCESS'

CI Report

Link to invocation

@nv-guomingz nv-guomingz merged commit 9871cbe into NVIDIA:main May 20, 2026
7 checks passed
@nv-guomingz nv-guomingz deleted the user/guomingz/remove_additional_space branch May 21, 2026 03:14
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